Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Joe Mizzi on Oct 31, 2007 19:10
open dhtmlx forum
Make a Checkbox in header select all / deselect all

Hi,
We are currently evaluating the dhtmlxGrid software and so far think its fantastic, however we have hit a small snag.

I want to make the checkbox in our header select / deselect all checkboxes in one column

our header column is

<column width="28" type="ch" align="center" >
<![CDATA[<input type="checkbox" onclick="(arguments[0]||window.event).cancelBubble=true;">]]>
</column>

This displays the checkbox, but I have no clue on how to make it interact with the checkboxes in its corresponding column

Can you help?

Thanks
Joe
Answer posted on Nov 01, 2007 03:03
To deselect all checkboxes in some column next code can be used

    grid.forEachRow(function(id){
       grid.cells(id,INDEX).setValue(0);
    });


where INDEX - index of necessary column