Added new node using the below code and not able to find a method to rename the user. Is there any way to rename added new node in the ignite tree ?
$("#firstTree").igTree("addNode", {Text: "New Node"}, selectedNode);
Hello Kavitha,
I am glad that you find my suggestion helpful and were able to solve your issue.
Thank you for using Infragistics components.
Regards,
Monika Kirkova,
Infragistics
Thank you for providing the solution. I tested on my side its working as expected.
If I understand right, your requirement is to get the updated data of the destination tree. This could be achieved by getting the id of the destination tree on nodeDropped event and accessing the data of this tree:
function dropNode(evt, ui) {
console.log(ui);
var id = ui.owner.element[0].id;
console.log(id);
var destinationTreeData = $("#" + id).igTree("option", "dataSource").settings.dataSource;
console.log(destinationTreeData);
}
Please test it on your side and let me know if you need any further information regarding this matter.
Hi Monika,
Provided drop node it's giving only dropped parent information. I need to retrieve whole tree.. Is there anyway to retrieve from parent element?. I want to retrieve from computer node to child-child node. Is there any method to retrieve whole noe information?.. Node dropped giving just parent-child information.
The updated data of the destination tree could be accessed by binding a method to the “nodeDropped” event and getting the ui.data property and the dragged element could be accessed by ui.draggable:
var data = ui.data;
var draggedElement = ui.draggable;
console.log(data);
console.log(draggedElement);
Below I am attaching the modified sample, demonstrating the described behavior. Please test it on your side and let me know if you need any further information regarding this matter.
1033.igTreeRenameNode.zip