Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jeff Smith on Aug 06, 2009 10:05
open dhtmlx forum
How can I auto-resize every grid column except one?

I work for AOL and we use your grid product. At the moment, we are trying to prevent the auto-resizing of a single column in a grid. We want all of the other grid columns to auto-resize when they are double-clicked as usual. We would like one of the columns however to not auto-resize when double-clicked. Is there any way to do this? We are currently using version 1.4

Thanks!

Jeff Smith
Answer posted by Alex (support) on Aug 07, 2009 02:23

You can try to use the following approach to disable column auto size on header double click:

grid.attachEvent("onHeaderClick",function(ind){
  grid.enableColumnAutoSize(ind!=SOME_INDEX);
  return true
 })
Where SOME_INDEX is index of fixed column