I cant figure out how to get the #master_checkbox working…
I needed a master checkbox that when selected, sets all checkboxes on and viceversa…
where I should put the #master_checkbox in my code?
mygrid.setHeader( "A,sel, B,C…
mygrid.setColTypes( "ro,ch,ro,…
mygrid.setInitWidths( "0,50,50,75,
mygrid.setColAlign( “center,center,center,center,
mygrid.setColumnColor(”#ffffff,#ffffff,#ffffff,#ffffff,
mygrid.setHeader( "A,#master_checkbox, B,C…
Please be sure to include dhtmlxgrid_filter.js in your project
I already tried:
mygrid.setHeader( "A,#master_checkbox, B,C…
and including the dhtmlxgrid_filter.js
but I get #master_checkbox text in the heather,
I’m using 1.4 version, is this the problem?
I’m using 1.4 version, is this the problem?
Yes, the fitlers and custom content supported only from dhtmlxgrid 1.5, basically you can achieve similar effect in case of grid 1.4 by using custom code
grid.attachHeader(“A,<input type=‘checkbox’ onclick=‘custom(this); (arguments[0]||event).cancelBubble=true;’,B”)
function custom(node.checked){
mygrid.forEachRow(function(id){
mygrid.cells(id,INDEX).setValue(node.checked?0:1)
})
}
where INDEX - index of necessary column
I already tried:
mygrid.setHeader( "A,#master_checkbox, B,C…
and including the dhtmlxgrid_filter.js
but I get #master_checkbox text in the heather,
I’m using 1.4 version, is this the problem?
I’m using 1.4 version, is this the problem?
Yes, the filters and custom content supported only from dhtmlxgrid 1.5
The native #master_checkbox functionality supported only from dhtmlxgrid 1.5