Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Scott Bailey on Apr 24, 2009 14:42
open dhtmlx forum
Prevent Collapsing of a single cell.

Hello,

Is it possible to prevent one cell in a layout from being collapsed. I don't want t hide the header as I am using this to display some information.

Many thanks
Scott
Answer posted by Alex (support) on Apr 25, 2009 02:02

Hello,

You can try to redefine the internal method that closes layout cell as follows (here "a" is id of non-closable cell):

var dhxLayout = new dhtmlXLayoutObject(...);
dhxLayout._collapse_old = dhxLayout._collapse;
dhxLayout._collapse = function(pId, mode) {
  if(pId == "a") return;
  dhxLayout._collapse_old(pId,mode);
}



Answer posted on Apr 27, 2009 04:36

Hello,

This works great, just one more point, is there any way to hide the arrows for the particular pane that has been disabled in this way?

Many thanks

Scott

Answer posted by Alex (support) on Apr 29, 2009 02:34

Hello,

Layout API doesn't allow to do that. But you can modify the dhtmlxlayout.js as follows:

locate _fixIcons method and add if(a == "cell id") continue; for the necessary cell:

this._fixIcons = function() {
  for (var a in this.polyObj) {
  if(a == "a") continue;

...

}