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

Checkbox Validating event (GridDataBoundGrid)

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

1 Reply

AD Administrator Syncfusion Team July 25, 2006 12:12 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon