|
Rank: Advanced Member Groups: Member
Joined: 1/9/2009 Posts: 97
|
I am using a Treeview with Auto-Populate to loads Directors and Files. I have it setup to where can selected a files/TreeNode and click a delete button in which the files is deleted but the item stays in the tree the only thing i can do to resolve this is refresh the entire page.
Is there a way to have the TreeView refresh itself?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can'd delete a node from the TreeView on the client side. But you can always call NavigationItem.setVisible from your JavaScript to hide a node. Note the visible status changes do not get carried back to the server. So your server side code still need to hide/delete the node accordingly.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 1/9/2009 Posts: 97
|
Well let me clairfy.
I have aTreeNode that does Auto-populate like your demo
It goes aout and load DIRECTORIES & FILES. And works great
I then alolow them to selecte a given TreeNode that is a File. They can then click a button which Postback to the server and the server code grabs the Selected Node and gets the FileLocation based on the Node and deltes the files and works
When the page finishs posting the treeview needs to be refreshed to show the Selected node is gone as the file corresponding to it has been deleted.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
No. You will have to code that. As a matter of princicple, none of our control would never implicitly establish any kind of connection/assumption with your business layer. The TreeView neither know nor care that you are dealling with directory and files here. The TreeView is generic, when you wish to add node you add node to the TreeView, when you wish to delete node you delete node from the TreeView. There is no such thing as automatically refreshing based on your business logic because it knows nothing about your business logic. Simply put, for anything that is related to your business logic, you will need to code yourself. This can also be a guiding rule for you in the future if you have similar questions.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 1/9/2009 Posts: 97
|
I wasnt talking about business logi and apologize if it came accross as that.
Heres a straight question does the Tree have a Refresh Property to refresh all NODES? even when auto-populate is set to true? Forget how im using can i have it resfresh a auto-populated tree Node?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
There is no such thing as "refreshing" because the real question is refreshing base on WHAT. And that "what" is your business logic. You build and modify the Tree as you wish and that's pretty much it. There is nothing else from the TreeView's perspective. Hope this clear it up.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 1/9/2009 Posts: 97
|
Yup thank You. I will look at either hiding,disabling or deleteing the node from the server side and this ill look for in the documentation
|
|