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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Model.ClearCells and Binder.DirectSaveCellInfo = true

Thread ID:

Created:

Updated:

Platform:

Replies:

33923 Aug 29,2005 09:28 PM UTC Aug 30,2005 05:05 PM UTC WinForms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 29, 2005 09:28 PM UTC

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

Administrator [Syncfusion]
Replied On 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();

Administrator [Syncfusion]
Replied On 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(); >

Administrator [Syncfusion]
Replied On 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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;