We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Saving changes to a DropDownGrid to the underlying datatable

(Haneef, I've opened this separate post to clearly state this specific problem.)

In the CurrentCellShowingDropDown event of grid1, I drop down a DropDownGrid (grid2) and set the datasource to a datatable. I've set...

grid2.Binder.DirectSaveCellInfo = true;
grid2.Binder.OptimizeListChangedEvent = false;

...so the datatable gets updated when the user leaves the cell.

However, if the user makes changes to a cell without leaving the active cell and just clicks on the dropdown arrow again to close grid2, the changes do not get saved to the datatable.

I need to find what event I can subscribe to to do a dtGrid2.AcceptChanges() or grid2.EndUpdate, or something so that changes are saved.

Any help is greatly appreciated. Thanks.

2 Replies

AD Administrator Syncfusion Team May 4, 2007 10:06 AM UTC

Something to try.

Subscribe to the CurrentCellCloseDropDown event and in the event handler, try calling grid2.CurrentCell.ConfirmChanges(). (If that does not trigger the save, also try calling grid2.Binder.EndEdit().)


DG Dan Garvin May 4, 2007 03:38 PM UTC

All I can say is...You the man!
The ConfirmChanges() worked. Thanks loads.
-dan

>Something to try.

Subscribe to the CurrentCellCloseDropDown event and in the event handler, try calling grid2.CurrentCell.ConfirmChanges(). (If that does not trigger the save, also try calling grid2.Binder.EndEdit().)

Loader.
Live Chat Icon For mobile
Up arrow icon