Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Boundcheckbox field getting clicked value in javascript
posted

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

Parents
  • 1320
    Verified Answer
    Offline posted

    Hello Muhammad,

    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"/>

                       <Behaviors>

                           <ig:CellEditing>

                           </ig:CellEditing>

                       </Behaviors>

                 </ig:EditingCore>

             </Behaviors>              

    </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.

    Regards,

    Monika Kirkova,

    Infragistics

Reply Children
No Data