Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Tejas Shah on Jul 21, 2008 06:32
open dhtmlx forum
DHTMLX TreeGrid : Insert Rows, Insert Coloumns, Combine Cells, Delete Rows, Delete Coloumns, Sort Rows, Sort Coloumns

Hi,
Can I have following functionality in the DHTMLX TreeGrid ???

1) Insert Rows in the TreeGrid.
2) Insert Coloumns in the TreeGrid.
3) Combine Cells in the TreeGrid.
4) Delete Rows in the TreeGrid.
5) Delete Coloumns in the TreeGrid.
6) Sort Rows in the TreeGrid.
7) Sort Coloumns in the TreeGrid.
Answer posted by Support on Jul 21, 2008 06:50
>>1) Insert Rows in the TreeGrid.
    grid.addRow(...
>>2) Insert Coloumns in the TreeGrid.
    grid.insertColumn(...
>>3) Combine Cells in the TreeGrid.
    grid.setColspan(...
    rowspans is not supported in treegrid
>>4) Delete Rows in the TreeGrid.
    grid.deleteRow(...
>>5) Delete Coloumns in the TreeGrid.
    grid.deleteColumn(...
>>6) Sort Rows in the TreeGrid.
    grid.sortRows(...
>>7) Sort Coloumns in the TreeGrid.
    operation not supported, you can move column programmatically by grid.moveColumn, but there is no any kind of built in column sorting.

Answer posted on Jul 22, 2008 02:02
Combine Cells means combining two different cells and merge them into one, can this be achieved with setColspan function ???
AND
sortRows() will work same as it works in DHTMLX Grid ??
Answer posted by Support on Jul 22, 2008 03:50
>>can this be achieved with setColspan function ???
Yes, multiple cells can be merged while they in same row. Such row will be processed correctly by sortRows function
    http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/rows_columns_manipulations/pro_colspan.html?un=1216724999000
Answer posted by Ramakrishna on Jul 30, 2008 00:20
Hi there,
All these functions are available for grid as well as treegrid, right ???????
Answer posted by Support on Jul 30, 2008 01:37
yes, all mentioned functionality can be used with both Grid and TreeGrid components
Answer posted by Ramakrishna on Jul 30, 2008 08:27
Hi,
    I want to combine two SELECTED columns (like we have in MS Excel) using setColspan; Is it possible ???
    How to delete the SELECTED column ?? Can it be done with deleteColumn ?
  Means all the above functionality will work same as MS Excel ???
   
Answer posted by Support on Jul 30, 2008 10:13
>> I want to combine two SELECTED columns (like we have in MS Excel) using setColspan; Is it possible ???
Yes, but it will combine only data parts of grid ,  the header will stay without modification
Also, setColspan can be used only against single row, so you will need to call it against each row in grid.\

>>  How to delete the SELECTED column ?? Can it be done with deleteColumn ?
Yes, deleteColumn command will remove column from grid ( both data and header parts )
The command must not be used on columns which included in colspans

>>Means all the above functionality will work same as MS Excel ???
It possible to add|delete columns and make|change collspans dynamically. So something similar to MS Excell functionality can be achieved