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.

Checkbox Validating event (GridDataBoundGrid)

Thread ID:

Created:

Updated:

Platform:

Replies:

46903 Jul 24,2006 03:33 PM Jul 25,2006 08:12 AM Windows Forms 1
loading
Tags: GridControl
Jonathan Quail
Asked On July 24, 2006 03:33 PM

Hi,

I am having some trouble with the GridDataBoundGrid when a column''s style is set to the checkbox.

It seems that whenever the user clicks the checkbox (or tabs into it and hits spacebar), the value is immediately set in the underlying DataView that the grid is bound to.

When the event handler for "CurrentCellValidating" is hit - the value has already been set in the dataview. So there is no way to cancel the validation or perform any action on the data before it is send to the data source.

This is not the case for textbox control in the cell - seems to only happen with checkboxes.

This is causing a significant problem in our application since we can''t do any custom actions before the dataview''s value is set like we can on every other control in our application.

Also - the behavior for a standard checkbox on the form is the same as for the textbox in a grid cell - the value is only set in the underlying dataview after the "Validating" event has fired (and that event didn''t get cancelled).

I noticed the value was set in the dataview even when the "CurrentCellChanged" event was fired - and that is fired before the Validating event.

Any ideas/workarounds would be greatly appreciated!

Btw - using Syncfusion 4.2.0.37

Thanks,

Jonathan

Administrator [Syncfusion]
Replied On July 25, 2006 08:12 AM

Hi Jonathan,

To avoid the value getting stored in the underlying DataView, please try this property setting.

this.gridDataBoundGrid1.Binder.AllowSetValueOnCurrentItem = false;

On setting this property to false, you will be able to modify the contents of cell, but will not allow to save the value to the underlying record.

Let us know if this helps.
Thanks,
Rajagopal

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.

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.

;