Say I have five rows in my DataTable (dtView) that has columns named "icon", "name" and "value". I want to get data from custom columns and rows of another DataTable (dtStyles) and insert it at row 3 in dtView, then I do like this:
Dim dr As DataRow
dr = dtView.NewRow
dr(0) = System.String.Format("")
dr(1) = dtStyles.Rows(RowNr).Item("displayname")
dr(2) = dtStyles.Rows(RowNr).Item("value")
This code results in an dtView DataTable where the new inserted row is appended as the last row, even thogh i have atleast 5 rows in my table and is inserting the new one at possition 3.
What am I doing wrong?