When we use datatable.newrow command, a new empty row added to bottom of rows. However I want newrow to added to top of datatable. How can I make it?
You use the NewRow to create a row with the same columns. To actually get it into the DataTable, you've got to do
myDataTable.Rows.InsertAt(myDataRow, 0);
Where 0 is the index you want to insert it at.
1.4m articles
1.4m replys
5 comments
57.0k users