I'm using v13.2 of the WebDataGrid.
When check/uncheck the HeaderCheckBox of the UnboundCheckBoxField all the checkboxes for that column are checked/unchecked.
That's great, but i would expect the CellValueChanging-event would be fired when the checkbox changes. This doesn't happen.
Please help...
Thanks in advance.
Hello Rob,
Thank you for posting in our community!
Could you provide an isolated sample to test your scenario further?
Thank you in advance!
I've got a grid with, for example 2 records. When i check the headercheckbox on the unboundcheckboxfield, i expect that i get a CellValueChanging-event for each row.
These events don't fire.
Thank you for your patience.
Since CellValueChanging event would be fired multiple times when the header checkbox is chaged this could cause slow performance if the grid contains hundreds of records. That’s why it is designed to be fired when a single cell is changed only. In order to handle the header checkbox changing the HeaderCheckBoxClicking event could be used. I have added steps for your reference to find it:
- Right-click on the WebDataGrid and choose properties
- In the properties windows navigate to the “ClientEvents” section
- Choose the HeaderCheckBoxClicking and add a handler
I have also added a code snippet bellow. The HeaderCheckBoxClicking and the CellValueChanging events are in bold:
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="400px"
AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
<Columns>
<ig:BoundDataField DataFieldName="Id" Key="Id">
<Header Text="Id" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Name" Key="Name">
<Header Text="Name" />
<ig:BoundDataField DataFieldName="Category" Key="Category">
<Header Text="Category" />
<ig:UnboundCheckBoxField Key="Check" HeaderChecked="False" />
</Columns>
<ClientEvents HeaderCheckBoxClicking="WebDataGrid1_Grid_HeaderCheckBoxClicking" />
<Behaviors>
<ig:EditingCore>
<EditingClientEvents CellValueChanging="cellValueChanging" />
<ig:CellEditing>
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="Category"
EditorID="WebDataGrid1_DropDownProvider1" />
</ColumnSettings>
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
</ig:WebDataGrid>
Hope this helps. If you have any further questions or concerns don’t hesitate to contact me again.
If any additional questions arise feel free to contact me again.