move a row to a different position in a dataset

egdotnet said:
how do you change the position of a row in a dataset w/ or w/o dataview?


This is how you switch between row i and j (i didn't try it)

Code:
dim dr as datarow
dr = ds.Tables("YourTableName").Rows(i)
ds.tables("YourTableName").rows(i)=ds.tables("YourTableName").rows(j)
ds.tables("YourTableName").rows(j)=dr
 
Back
Top