Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rod on Sep 01, 2009 04:23
open dhtmlx forum
dhtmlxGrid - master_checkbox

Im usign a dhtmlxGrid and it has a 'ch' column, there is also a #master_checkbox on the header section,

whem im loading data into the grid (with json) there is a 'verify' function implemented, this enables / disables the record checkbox, so for example, we could have 10 records and 5 of them could be "disabled"

when im check the #master_checkbox it checks/unchecks all the records in the grid,
is there any way to avoid checking/unchecking disbaled records ? ( the idea is disabled records cannot be modified -checked/unchecked- )

thanks!
Answer posted by Support on Sep 01, 2009 11:14
You need to modify code of "master_checkbox" or create a custom one to achieve such effect. 

dhtmlxgrid_filter.js

self.forEachRow(function(id){
    var c=this.cells(id,j);
    if (c.isCheckbox()) c.setValue(val);

can be changed to 

self.forEachRow(function(id){
    var c=this.cells(id,j);
    if (c.isCheckbox() && !c.isDisabled()) c.setValue(val);

we will check possibility of such modification adding to the main codebase