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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Issues with ConfirmChanges() in CurrentCellChanging event

Thread ID:

Created:

Updated:

Platform:

Replies:

71668 Feb 8,2008 07:41 PM UTC Feb 14,2008 09:24 AM UTC Windows Forms 6
loading
Tags: GridControl
Michael Sabin
Asked On February 8, 2008 07:41 PM UTC

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?


SubhaSheela R [Syncfusion]
Replied On 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


SubhaSheela R [Syncfusion]
Replied On 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


Michael Sabin
Replied On 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

SubhaSheela R [Syncfusion]
Replied On 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



Michael Sabin
Replied On 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


SubhaSheela R [Syncfusion]
Replied On 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



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

;