Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
UltraGrid - delete row during InitializeRow
posted

My scenario is I am adding 3 rows to a Datatable to populate a grid.

After I add the 3 rows the InitializeRow gets called on the grid for the 3 rows.

All is well UNLESS I decide in InitializeRow method that I do not want the row in the grid. and try to delete row. If I call the 'delete' method for the row then the next row that shoud have had InitializeRow called gets skipped. So for example if I delete the first row then the InitializeRow method never gets called for second row , it goes right to third row.

In the InitializeRow method I have tried :

UltraGridRow r

ow = e.Row;

row.Delete(

false);

and I have tried :

 

 

 

UltraGridRowrow = e.Row;

 

 

int index = row.Index;

DataTableNewOrder.Rows[index].Delete();