Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by veerendranadh on Sep 19, 2008 02:20
open dhtmlx forum
How to check all checkboxes in dhtmlx grid

I am using dhtmlx grid. My question is : how to check all checkboxes in the grid ( by checking single checkbox in the header or it will be in somewhere else).
Hope i can get response.

Regards,

Veerendranadh.Potru
Answer posted by Support on Sep 22, 2008 02:50
Grid provides master_checkbox functionality  in header. It allows to check /uncheck all checkboxes in grid. The sample can be found in the documentation dhtmlxGrid/samples/filtering/pro_filter_num.html
on web site - http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/filtering/pro_filter_num.html

In common case checkboxes can be checked using the following approach:

grid.forEachRow(function(id){
            var cell=grid.cells(id,INDEX);
            if (cell.isCheckbox()) cell.setValue(1);
});