Welcome Guest Search | Active Topics | Sign In | Register

TreeView Auto-populate refresh Options
Loren Dorez
Posted: Thursday, December 3, 2009 3:27:23 PM
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?
eo_support
Posted: Thursday, December 3, 2009 3:36:41 PM
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!
Loren Dorez
Posted: Thursday, December 3, 2009 3:59:04 PM
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.
eo_support
Posted: Thursday, December 3, 2009 4:14:38 PM
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
Loren Dorez
Posted: Thursday, December 3, 2009 4:36:31 PM
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?
eo_support
Posted: Thursday, December 3, 2009 4:43:39 PM
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
Loren Dorez
Posted: Thursday, December 3, 2009 4:53:21 PM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.