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

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 - dhtmlx.com/docs/products/dht … r_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);
});


Is this functionality still built-in?

The sample linked above (http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/filtering/pro_filter_num.html) is no longer available.

Yes, this functionality is available dhtmlx.com/docs/products/dht … r_num.html

I might suggest that the discussion and example of Master Checkbox should be moved out of the Filtering section and moved to either the sections on setHeader or on the section about Check Boxes. It’s current location under Filter keeps it hidden from those who might want to use it.

Thank you for your note. We’ll working on improving our documentation.

It seems that an answer was provided for this question and since my question is related to the same topic, I will ask it here.

Can the #master_checkbox tag only be used when attaching extra (filter) headers or can I some how use it in the “normal” header? (I don’t want 2 headers).

You may define a master checkbox in the main header with setHeader method:

mygrid.setHeader("#master_checkbox")

Please, contact sales[AT]dhtmlx.com for the details about the customization.