Hello,
I would like to know if there is a way to block certain columns to be moved when the enableColumnMove option is on.
Same with the enableHeaderMenu option, to prevent certain columns from being hidden.
I would like to know if there is a way to block certain columns to be moved when the enableColumnMove option is on.
You can use onBeforeCMove event. Please find example here dhtmlx.com/docs/products/dht … veCol.html
>>Same with the enableHeaderMenu option, to prevent certain columns from being hidden.
It can be done only with code modification. In the file
dhtmlxgrid_hmenu.js line 81 (inside
dhtmlXGridObject.prototype._createHContext=function() function):
for (var i; i<this.hdr.rows[1].cells.length; i++){
var c=this.hdr.rows[1].cells[i];
if (c.firstChild
&& c.firstChild.tagName==“DIV”) var
val=c.firstChild.innerHTML;
else var val =
c.innerHTML;
if
(val!=“NECESSARY COLUMN LABEL”) {
a.push("
true_ind+=(c.colSpan||1);
}
}