Hi,
We are using webdatagrid 20.1 version and trying to get the boundcheckbox column checked and unchecked values in javascript.
<igtbl:BoundCheckBoxField DataFieldName="Status" Key="Status" DataType="System.Boolean" Width="90px" VisibleIndex="3" Hidden="false" >
<Header Text="<%$ Resources: SystemResource, grdColIsApproved %>" />
</igtbl:BoundCheckBoxField>
<CellEditingClientEvents ExitedEditMode="grdDetail_AfterCellUpdateHandler" />
How to get this checkbox checked and unchecked values in javascript
Regards,
m.hassan
Hello Muhammad,
I am glad that you find my suggestion helpful and were able to solve your issue.
Thank you for using Infragistics components.
Monika Kirkova,
Infragistics
Thanks, it really helped.
After investigating this further, I determined that clicking on BoundCheckBoxField would not trigger “EnteringEditMode” event. However, “CellValueChanging” event would be fired and the new value of BoundCheckBoxField could be accessed in a method bound to this event:
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="400px" AutoGenerateColumns="False">
<Columns>
. . .
<ig:BoundCheckBoxField DataFieldName="Status" Key="Status" DataType="System.Boolean" Width="90px" VisibleIndex="3" Hidden="false">
</ig:BoundCheckBoxField>
</Columns>
<Behaviors>
<ig:EditingCore>
<EditingClientEvents CellValueChanging="checkboxClick"/>
<ig:CellEditing>
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
</ig:WebDataGrid>
<script>
function checkboxClick(sender, e) {
let currentCell = e.get_cell();
if (currentCell.get_column().get_key() == "Status") {
let newValue = e._newValue;
}
</script>
Please test it on your side and let me know if you need more information.