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

EndEdit

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? Sean

2 Replies

Administrator July 22, 2004 01:17 PM UTC

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.

SG Sean Greer July 22, 2004 03:23 PM UTC

Thanks Clay.
Loader.
Live Chat Icon For mobile
Up arrow icon