dhtmlxGrid - master_checkbox

Discussions converted from DHTMLX KB which were not assigned to any category but still regard various DHTMLX components. Do not post new questions here!
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!
Rod
 
Posts: 3
Joined: Sat Jan 23, 2010 12:00 pm

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
Support
 
Posts: 8372
Joined: Sat Jan 23, 2010 11:52 am


Return to Uncategorized discussions

Who is online

Users browsing this forum: No registered users and 66 guests