Reputation: 3891
i want to add new row at middle of the gridview. How to achieve this.
The Gridview bind by DataTable. In DataBound Event I want to add new row in particular row, using row index
Upvotes: 1
Views: 1975
Reputation: 13484
You can insert a row at specific position use the API of your binding source. For example if the grid is bound to a DataTable use the following code:
DataRow row = table.NewRow();
table.Rows.InsertAt(row, 5);
Upvotes: 2