Hello all,
I am trying to bind a TreeView to a folder on the server - and I've got it working. The issue is that I would like to give users the ability to create their own folders. Through a javascript prompt, I'm able to get the new folder's name, and submit it via Ajax to a web service that creates the folder on the file system.
Where I'm stuck is adding the new node (folder) to the TreeView, and having it display. I got the javascript working, but sometimes it doesn't mark the new node as a directory (with a "plus" icon) - and sometimes it does. It's inconsistent (see attached image of a newly inserted node). Now if I refresh the page, the new folder appears correctly (with the "plus" icon).
I realize I'm binding to a physical directory on the server side, and then dynamically inserting a node on the client side - so maybe this is part of the problem. I'm just looking for a way to allow the user to create a folder, then have it added to the TreeView and selected (highlighted), with the ability to continue adding subfolders.
I'm okay with a page refresh - but so far I haven't been able to find a way to select a child node on the page load (I can select a top-level "root" folder, but it doesn't expand the tree to select the child node.
You can download mt test page here:
https://dl.dropboxusercontent.com/u/2316951/Web/telerik.zip
Thanks for any assistance!
I am trying to bind a TreeView to a folder on the server - and I've got it working. The issue is that I would like to give users the ability to create their own folders. Through a javascript prompt, I'm able to get the new folder's name, and submit it via Ajax to a web service that creates the folder on the file system.
Where I'm stuck is adding the new node (folder) to the TreeView, and having it display. I got the javascript working, but sometimes it doesn't mark the new node as a directory (with a "plus" icon) - and sometimes it does. It's inconsistent (see attached image of a newly inserted node). Now if I refresh the page, the new folder appears correctly (with the "plus" icon).
I realize I'm binding to a physical directory on the server side, and then dynamically inserting a node on the client side - so maybe this is part of the problem. I'm just looking for a way to allow the user to create a folder, then have it added to the TreeView and selected (highlighted), with the ability to continue adding subfolders.
I'm okay with a page refresh - but so far I haven't been able to find a way to select a child node on the page load (I can select a top-level "root" folder, but it doesn't expand the tree to select the child node.
You can download mt test page here:
https://dl.dropboxusercontent.com/u/2316951/Web/telerik.zip
Thanks for any assistance!