Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Tejas Shah on Sep 09, 2008 06:54
open dhtmlx forum
DHX Grid : Problem after deleting one of the column which are having collspan.

Hi there,
After I merge two cells and then I delete the last column whose cell is merged, then automatically it combines the first cell with the next column's cell.
I want to disable this functionality.
How to do this ?????
Answer posted by Support on Sep 09, 2008 07:56
The deleting column one of which cell included in colspan is not supported operation. While it may not throw direct js errors, grid doesn't support such operation correctly. Column may be removed only when its cells not included in colspans with different columns ( or all such columns need to be removed )
Answer posted by Tejas Shah on Sep 09, 2008 10:55
Hi,
     If I want to achieve the functionality that I want, What changes I need to do in the respected file(s) ???
Answer posted by Support on Sep 10, 2008 01:39
The only way is 
a) remove colspans from all spanned cells related to the column in question (  use setColspan with 1 as 3rd parameter )
b) remove column in question
Answer posted by Tejas Shah on Sep 11, 2008 02:01
Hi,
    I did as you said.
    Following is the code :
  
    for (var i=0; i<=libTableGrid.getRowsNum(); i++)
   {
            libTableGrid.setColspan(i,columnIndex,1);
    }
    and then
    libTableGrid.deleteColumn(columnIndex);

    But now its not deleting any column (merged as well as non-merged)
    Whats the problem in the code snippet ?

Answer posted by Support on Sep 11, 2008 07:26
The code which you are using not removes colspans
Workign sample sent by email. 
Answer posted by Tejas Shah on Sep 19, 2008 03:05
Hi there,
             I didnt receive the working sample by mail.
             Please send me the working sample