I have a question regarding the proper way to ask the GDBG to persist changes to the datasource. I *thought* I had all of this nailed until I spent several hours tracking down a strange issue and the cause appears to be calling Binder.EndEdit followed by CurrentCell.EndEdit.
With typical controls it''s enough to call this.BindingContext[dataSet, "datatable"].EndCurrentEdit() and the binding architecture handles pulling data, but with the grid this doesn''t appear to be enough. I assume that''s why Binder.EndEdit and CurrentCell.EndEdit exist.
My question is what is the proper usage of these two methods? Do both need to be called or does Binder.EndEdit call CurrentCell.EndEdit?
ADAdministrator Syncfusion Team July 22, 2004 09:17 AM
CurrentCell.EndEdit ends ths editing of the current cell and saves for that cell into a local row cache of row changes. Binder.EndEdit ends the editing of the row object and moves the locally cached values into the DataSource.
So, normally, you would call CurrentCell.EndEdit before your would call Binder.EndEdit. CurrentCell.EndEdit is a grid operation and just affects grid structures. Binder.EndEdit is both a grid operation and a CurrencyManager operation which affects structure in both the grid and the Datasource.