Hello.
We have found the possibility that, in the grids, columns defined as checkbox (ch), may have rows where the cell is not defined (is empty, without checkbox).
In these cases, when you press the master_check, does not take into account whether the cell is empty.
For these cases, the script should check if that is the case.
dhtmlXGridObject.prototype._in_header_master_checkbox_a = function(t, i, c) {
t.innerHTML = c[0] + "<input type='checkbox' />" + c[1];
var self = this;
t.firstChild.onclick = function(e) {
self._build_m_order();
var j = self._m_order ? self._m_order[i] : i;
var val = this.checked ? 1 : 0;
var max = self.getRowsNum();
for (var ind = 0; ind < max; ind++) {
var c = self.cells2(ind, j);
if (c.isCheckbox() && c.cell.innerHTML.indexOf("img") !== -1) {
c.setValue(val);
}
}
(e || event).cancelBubble = true;
}
}
The changes in line
if (c.isCheckbox()){
if (c.isCheckbox() && c.cell.innerHTML.indexOf("img") !== -1) {
should do the magic.
Maybe, in the future, you can implement this improvement in your scripts.
Your solution is considered but it won’t be added to the future versions of dhtmlxgrid.
It’s not guaranteed that it will work correctly in all situations.
Unfortunately the keeping the cell empty is not common for a checkbox column.
The primary way for this situation is to change the exCell type for this cell:
Please, refer to the following example: dhtmlx.com/docs/products/dht … d_api.html
In any parent row (Honda, BMW,…) open the editor of the “Volume” column, then press TAB key to go to the next cell of the row. Now if you press the “Space” key you will check that “invisible” checkbox in the “State A” column and it appears in the grid.
So, we disable the pulsations of the “Space” key.
In this way, we force the user to use the mouse to operate the checkbox.
It’s not the perfect compromise but rather fits what we need.