This is My ClientSide code ,I am planing to sort the Tree items using MoveUp and move down option in Context menu
function RadTreeView1_ClientContextMenuItemClick(sender, eventArgs) {
//to get the direction
var Direction = eventArgs._menuItem.get_text();
//to get the position clicked
var Index = eventArgs._node.get_index();
//to get the lenght of the tree node
var length = eventArgs._node._parent._children._array.length;
//to get all siblings
var nodes = eventArgs._node._parent._children._array;
var counter;
if (Direction == "Move Up") {
temp = eventArgs._node.get_text();
eventArgs._node.set_text(eventArgs._node.get_previousSibling().get_text());
eventArgs._node.get_previousSibling().set_text(temp)
}
else if (Direction == "Move Down") {
temp = eventArgs._node.get_text();
eventArgs._node.set_text(eventArgs._node.get_nextSibling().get_text());
eventArgs._node.get_nextSibling().set_text(temp)
}
eventArgs._node.get_treeView().commitChanges();
var tree = document.getElementById("ctl00_TreeContentPlaceHolder_RadPanelBar1_i0_RadTreeView1");
tree.commitChanges();
}
Move up and down is achived in the code but still i can not able to retain the sorted order of the Treeview using the code
In tree object i can not able to find any method like commitChanges()
it thoroughs an error says it can not contain any method,
please help me out to complete the task as soon as possible,this is urgent.
Thanks in advance