Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by couetbis on Sep 18, 2008 08:15
open dhtmlx forum
column width not respected with splitAt

Hi,
I have next instructions :
a) config is loaded with xml string (xml content only head)
b)insert new column (index 0) and split it
grid.insertColumn('0','<span title=\'Action\'>  </span>','ch','30','na','center','middle','');
    grid.setColumnId(0, 'select');
    grid.setColumnMinWidth(30, 0);
    grid.splitAt(1);
c)load data with json string

The new column are splitted but width are not respected.
Without insertColumn instruction, it's work fine but I must insert column afer config ...

Any idea ? Thanks
Answer posted by Support on Sep 19, 2008 09:56
Split mode is not compatible with setMinColumnWidth method. You can disable resizing for the first column:

grid.enableResizing("0,1,1,1....");
Answer posted by couetbis on Oct 03, 2008 08:39
Thanks for reply.
I have no change with this solution. I delete setColumnMinWidth instruction too but it's doesn't work.
Another solution ?


Answer posted by Support on Oct 03, 2008 09:19
Just change 
    grid.insertColumn('0','<span title=\'Action\'> </span>','ch','30','na','center','middle','');
to the 
   grid.insertColumn('0','<span title=\'Action\'> </span>','ch',30,'na','center','middle','');
the size must be set as int value, not as string ( while it less critical in normal case, it necessary in case of split mode )
Answer posted by couetbis on Oct 06, 2008 00:25
Thanks very much, it's work !