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
close icon

Model.ClearCells and Binder.DirectSaveCellInfo = true

Model.ClearCells does not save the changes immediately when Binder.DirectSaveCellInfo = true. I have tried ConfirmChanges() and EndEdit() after ClearCells is executed but it does not save the changes immediately. Is this a bug? Is there any workaround? TIA, Jose

3 Replies

AD Administrator Syncfusion Team August 29, 2005 11:28 PM UTC

I will forward this problem to the grid architect to see if this is something we can handle in our library. I think you can work around the problem by calling Refresh on the CurrencyManager after calling ClearCells. CurrencyManager cm = this.gridDataBoundGrid1.BindingContext[this.gridDataBoundGrid1.DataSource, this.gridDataBoundGrid1.DataMember] as CurrencyManager; cm.Refresh();


AD Administrator Syncfusion Team August 30, 2005 04:03 PM UTC

Work around is not working. For some reason the grid is still in editing mode after Model.ClearCells is executed. This issue was introduced after version 2.1.0.9. Also I need to know what is the issue # assigned for this problem. >I will forward this problem to the grid architect to see if this is something we can handle in our library. > >I think you can work around the problem by calling Refresh on the CurrencyManager after calling ClearCells. > >CurrencyManager cm = this.gridDataBoundGrid1.BindingContext[this.gridDataBoundGrid1.DataSource, this.gridDataBoundGrid1.DataMember] as CurrencyManager; >cm.Refresh(); >


AD Administrator Syncfusion Team August 30, 2005 05:05 PM UTC

Where/When are you calling Model.ClearCells. Here is a sample showing the cm.Refresh working if your user selects a range of cells and pressing the delete key. http://www.syncfusion.com/Support/user/uploads/GDBG_db1a563c.zip In this sample, if you comment out the ClearCells event code, you see the row with the current cell being left in the DataGrid. But if you drag the form so the DataGrid has to repaint, you will actually see the data in the datatable has been modified, and it is just the datagrid has not refreshed the row. This suggests that a ListChanged event was not raised for that row. This may or may not be a bug in our grid. I will have to forward it to the grid architect. Anyway, I think you should to work around this problem. How is the problem manifesting itself in your case. Do you have another object listening to ListChnaged events? If so, what does your other do when it gets a reset from the ListChangeType? Does it refresh itself? If so, then I would think the work around suggested here should handle it. If you can upload a sample showing exactly what is failing in your case, we might be able to suggest something better.

Loader.
Live Chat Icon For mobile
Up arrow icon