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

Issues with ConfirmChanges() in CurrentCellChanging event

I have a GridDataBoundGrid in which I have the CurrentCellChanging event handled. In it I call both grid.CurrentCell.ConfirmChanges() and grid.Binder.EndEdit(). The cell that it is occurring on is a CheckBox.

After this occurs, in another method, I create a DataView on the DataTable that is set as the DataSource of the grid. However, in this DataView, I am not seeing the changes that should have been confirmed. Is there something I am missing?


6 Replies

SR SubhaSheela R Syncfusion Team February 12, 2008 07:34 AM UTC


Hi Michael,

Thank you for using Syncfusion products.

I have created a sample with CheckBox in one column and bounded the same DataView to two GridDataBoundGrid controls. I can see the changes reflected in the second control while changing data in the first control. Could you please reproduce the issue in this sample, so that I could provide you the exact solution? Or please send us your sample with issue, we will analyze it and provide you the details.

Please refer the sample available in the link below and let me know if it helps:

http://websamples.syncfusion.com//samples/Grid.Windows/I71668/main.htm

Regards,
Subhasheela R



SR SubhaSheela R Syncfusion Team February 12, 2008 07:35 AM UTC

Hi Michael,

Thank you for using Syncfusion products.

I have created a sample with CheckBox in one column and bounded the same DataView to two GridDataBoundGrid controls. I can see the changes reflected in the second control while changing data in the first control. Could you please reproduce the issue in this sample, so that I could provide you the exact solution? Or please send us your sample with issue, we will analyze it and provide you the details.

Please refer the sample available in the link below and let me know if it helps:

http://websamples.syncfusion.com//samples/Grid.Windows/I71668/main.htm

Regards,
Subhasheela R



MS Michael Sabin February 12, 2008 01:57 PM UTC

OK, i re-created the issue. First check some items in the grid and then click on the TextBox. You will notice that the label of selected items will not match the actual selection



GDBGCurrentCellEditEvent.zip


SR SubhaSheela R Syncfusion Team February 13, 2008 06:36 AM UTC

Hi Michael,

Thank you for using Syncfusion products.

You can set DirectSaveCellInfo property of GridDataBoundGrid's Binder class, which saves cell values directly into the data source without moving the current record or without calling the Begin/End Edit method. Below is the code snippet:

this.gridDataBoundGrid1.Binder.DirectSaveCellInfo = true;


Please refer the sample available in the link below and let me know if it helps:

http://websamples.syncfusion.com//samples/Grid.Windows/F71668FollowUp/main.htm

Regards,
Subhasheela R




MS Michael Sabin February 13, 2008 04:28 PM UTC

Thanks, that seems to work. Do you know why this isn't set as a default setting?

Thanks



SR SubhaSheela R Syncfusion Team February 14, 2008 09:24 AM UTC

Hi Michael,

In GridDataBoundGrid Control, the DirectSaveCellInfo property is not set as default property, since it throws some errors in some scenario. For example, if you have one table in which you set some of the columns in the table as not null and if you try to move on to the next cell, the error that "Company Name" (column name of the table) cannot be null, keeps popping up, when that DirectSaveCellInfo property is set. So, we could not set it as default one. Please let me know if you have any questions.

Regards,
Subhasheela R



Loader.
Live Chat Icon For mobile
Up arrow icon