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;
row.Delete(
false);
and I have tried :
DataTableNewOrder.Rows[index].Delete();
Interesting problem. You can fix it by yourself:
if (deleteRow){ int index = e.Row.Index; e.Row.Delete(false); ultraGrid1.Rows[index].Refresh(Infragistics.Win.UltraWinGrid.RefreshRow.FireInitializeRow);}
That worked like a charm! Thank you so much!!