Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Paul on May 28, 2007 05:25
open dhtmlx forum
dhtmltreegrid move rows

I have some questions about treegrid control:
1. Im using moveUp() and moveDown() funtions. I noticed that after calling both functions, row indexes do not get updated. Do those functions just change row positions visually??
Is there any function to update row index afeter a moveup or move down?? this is important to me cause I need to asign a number to each row in all levels as follows:
Item    Name
1      Parent 1
1      Child 1.1
2      Child 1.2
3      Child 1.3
2      Parent 2
1      Child 2.1
2      Child 2.2
1      Sub-Child 2.2.1
2      Sub-Child 2.2.2
3      Sub-Child 2.2.3
3      Parent 3
4      Parent 4
 .
 .
 .

2. My treegrid uses dataprocessor with "row" mode. I have a function that adds rows recursively in 5 levels,
but all nodes do not save well. Some nodes are saved without the correct parent id.
I tried using sendData function, but I got dupplicated items. Im doing something wrong?
3. When I change the value of a cell with cells() function, the "update event" does not launch (the row doesnt change its style to bold). Is there any way to change it manually??

 

Answer posted on May 28, 2007 10:39
1. Im using moveUp() and moveDown() funtions.
Both functions moveRowDown and moveRowUp purposed to be used inside plain dhtmlxGrid, while they can visually work in treeGrid as well, they doesn't use tree hierarchy so result can be incorrect.

In case of treeGrid you can use
    grid.moveRoTo(...
which works correctly for both grid and treegrid

2. My treegrid uses dataprocessor with "row" mode.
While working with treeGrid there possible situation, when few concurent requests can be sent to the server in same time. Problem partially fixed in latest dataProcessor lib, please contact us directly as dhtmlx@scand.com, and provide your customer number - we will send you latest version.


Answer posted on May 28, 2007 10:41
3. When I change the value of a cell with cells() function
The row switch to changed state only after manual data updates, it doesn't react to the updates done through API.
To mark row as updated, you can use
    dataProcessor.setUpdated(rowId,true);
Answer posted by Darya (Support) on Nov 29, 2014 13:23

The information connected with mobile javascript framework and tree menu dhtml also can help you, so please check it too.