I am using Dhtmltreegrid control to display the activities of project. It is working fine but I have a problem while adding an activity between two activities. The row is add but the order is not proper. For ex:
Activity 1
Activity 2
Activity 3
Activity 4
When I add Activity x in between Activity 2 & 3 the Activty X is coming at the end not between 2 & 3.
Can you please help us with some sample code?
function addBefore(){
var sel=mygrid.getSelectedId();
if (!sel) return;
var rowId1 = mygrid.uid();
mygrid.addRowAfter(rowId1,[0,“New”],sel);
}
I am using this function to add a new row. When I insert the row it is displaying as if it is inserted at the exact location. But we retrive the back from the database it is moving to last to row.
Activity 1
Activity 2 Activity X
Activity 3
Activity 4
after retrive from database
Activity 1
Activity 2
Activity 3
Activity 4 Activity X