Hi,
I want to add a row to the grid at a particular row index. How can i do it?
Using XamDataGrid.DataItems.Add() will add the row to the bottom of the frid. I want to add the row, say at the second position.
Thanks
Varun
Varun,
You can use the Insert method of the DataItems collection to do this:
this.dgDet.DataItems.Insert(1, employeeDet);
For more flexibility, you can bind to grid to a collection(BindingList<T>) and manipulate it, instead of directly inserting items inside the XamDataGrid.
BindingList<Employee> dataSource = new BindingList<Employee>();
Hope this helps.