Categories | Question details Back To List | ||
Grid - Hide one column fixed Hello, I am using Dhtmlx Pro version. I have a Grid / TreeGrid and I was wondering if there was a way to hide a column, but not to let the user select to see it in case I add this funcionality with the "grid selection of columns" functionality. Do I have to use userData for this particular cases? Thanks Andres Answer posted by dhxSupport on Nov 17, 2009 02:41 >>grid selection of columns Do you mean columns' hiding using header menu? In such case 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!="UNNECESSARY COLUMN LABEL") { a.push("<div class='dhx_header_cmenu_item'><input type='checkbox' column='"+true_ind+"' len='"+(c.colSpan||1)+"' checked='true' />"+val+"</div>"); true_ind+=(c.colSpan||1); } } Answer posted by Andres on Nov 17, 2009 03:21 Thank you very much for your fast reply. I will try this out. Andres |