AD
Administrator
Syncfusion Team
October 11, 2004 03:21 PM UTC
1) You can call grid.CurretnCell.EndEdit and grid.Binder.EndEdit and this should force the grid to save any pending changes. But you need to be care where/how you call these methods to avoid recursive calls. You could try using the CUrrentCellMoved event. But doing 2 is probably a better option.
2) Yes. You can catch the CurrentCellMoving event. If grid.CurrentCell.MoveToRowIndex is the AddNew row, go ahead and add a DataRow directly to your DataTable. This will give you a chance to populate fields before your user starts to edit things if that is what you want.
3) Normally, changes are saved as you leave the row. So, you could try grid.RowLeave or if you want to save them as the user leaves the cell (not necceasily the row), you can try CurrentCellMoved (using grid.CurrentCell.MoveFormRowIndex to know what the old row was.)