This is a migrated thread and some comments may be shown as answers.

[Solved] RadTreeView + UpdatePanel - Best Practices

3 Answers 279 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Peter Zolja
Top achievements
Rank 1
Peter Zolja asked on 08 Mar 2008, 01:36 AM
Hi guys,

I have a page with two columns, on the left side I have a RadTreeView and on the right I have a list of actions for the selected node. I'm using an UpdatePanel for the tree and another for the right side; both with their update mode to conditional. I also need to be able to rearrange nodes in the tree. All this is working fine.

My question is: Is this the best way to do this? Does the RadTreeVew have something I could use that would make this better (faster, less viewstate etc)? I'm not saying it's slow or anything -- I just want to make sure I'm doing it the right / most efficient way.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Puzsol
Top achievements
Rank 1
answered on 11 Jun 2008, 06:07 AM
I have a similar setup... except the treeview is on the left, and when a node is clicked I want to display some information on the right.... I don't want a full postback so I put it the data fields in an UpdatePanel... which is refreshed just fine... except that the treeview re-displays itself (as if it is ALWAYS) responding to the postback - not conditional like a good little control... which is really annoying to see the treeview redraw itself each time you click a node..

Is there some property I missed?

Thanx

Andrew
0
Peter Zolja
Top achievements
Rank 1
answered on 11 Jun 2008, 06:17 AM
Put the RadTreeView in one UpdatePanel on the left and in another UpdatePanel, on the right, put the controls that show the updated information. Set the UpdateMode to Conditional for both UpdatePanels. From the RadTreeView's OnNodeClick event update the information on the right and when done call (only) the second UpdatePanel's Update() method. This way all the information is posted back, no way around this, but the information that comes back from the server only updates the panel on the right, so the tree stays put.
0
Puzsol
Top achievements
Rank 1
answered on 11 Jun 2008, 07:27 AM
Sorry, It's been a long day... I actually tried the extra update panel... at the moment it seems that it is not needed.... I got confused with the tree view functionality and my own (I have code to refresh the selected tree node on page load -which is also fired during an asynchronous postback - in order to display a newly uploaded file... sigh... add a flag to indicate when to do the refresh and the problem went away).... sorry for the erroneous post.... thank you for your quick reply.

Andrew
Tags
TreeView
Asked by
Peter Zolja
Top achievements
Rank 1
Answers by
Puzsol
Top achievements
Rank 1
Peter Zolja
Top achievements
Rank 1
Share this question
or