woj-mar

woj-mar

  • NA
  • 4
  • 0

DataColumn Question

Mar 15 2005 8:42 AM
I have DataTable DataTable dt=ds.Tables["Persons"]; ____________________ LP.| FName | SName | ----------------------- 21 John | Smith | 33 Ted | Bear | 54 Michael | Zxxx | [...] 132 Stif | Som | ____________________ I add a new column to this table DataColumn colPosition=new DataColumn("Position"); dt.Columns.Add(colPosition); How fill this data column a data beetwen 0 to number of records __________________________ LP.| FName | SName | Position ------------------------------ 21 John | Smith | 0 33 Ted | Bear | 1 54 Michael | Zxxx | 2 [...] 132 Stif | Som | 124 ___________________________ DataRow dr=dt.NewRow(); dr["Position"]="1"; dt.Rows.Add(dr); this add a new row, but i wont to update existing table in Position colum and add a number to them. How do that? Edit/Delete Message

Answers (1)