how to call custom renderer after creating a node programmatically

106 views
Skip to first unread message

david.je...@gmail.com

unread,
Nov 7, 2013, 5:17:03 PM11/7/13
to dyna...@googlegroups.com
Hi,

I am creating a text input to create a new node (folder) using the custom renderer

onCustomRender: function(node) {
      if(node.data.title == "New Folder") {
   return "<span><input id='new-folder-text-input' type='text' autofocus onkeyup='updateNode(this.value, false);' placeholder='New Folder' class='dynatree-title' value='New Folder'></input><input id='new-folder-save' type='button' disabled='disabled' value='Save' onclick='updateNode(document.getElementById(\"new-folder-text-input\").value, true);' /></span>";
}
}

I am reloading children from the selected node (which is the parent node of the above new node) and reloading the children after successful ajax call in updateNode

using $("#wem-browse-folder").dynatree("getTree").getNodeByKey(_activeKey).reloadChildren();

However, I am not able to get rid of the textinput node on reloadChildren created using the custom render

Was wondering how to solve this? Any help would be appreciated.

Thanks,
David.



faroo...@gmail.com

unread,
Oct 6, 2016, 3:04:19 AM10/6/16
to Discuss jquery.dynatree.js, david.je...@gmail.com
Hi ,

Did you able to achieve this ? Please share how you have handled this .It helps me alot.

Thanks,
Mohammed Farooq
Reply all
Reply to author
Forward
0 new messages