treeview causes screen repaint every node clicked :(

  • Thread starter Thread starter Jason Shohet
  • Start date Start date
J

Jason Shohet

I want to turn off the postbacks unless the node is the bottom-most node.
If its a top level node, for example, the user has to drill down anyway.
Why postback, make the user wait for the screen to refresh? Anyone know how
2 do this?

TY
Jason Shohet
 
you will need to embed javascript in the last node to cause a post back and
then set autopostback to false in the tree control.

You are trying to fix a symptom though. What problems are you experiencing?
If you set autopostback to false you have to first get the entire tree so
that each click already has the node information in place. This will consume
a large amount of memory depending on tree size.

Normally, the model is to go get little bit of information rather than a
large chunk of information for scalability, performance and bandwidth
reasons. Your approach is not uncommon though but you need to be aware of
these issues. In addition, your final click which posts back will be
terribly inefficient as the entire tree is round-tripped.

regards
 
Our tree is small -- not a lot of data.

IF THE USER HITS THE PLUS SIGN, I DON'T WANT TO POSTBACK :)

But if the user hits the person's name (which is the text of the tree node)
then I do want to postback.

Anyone have any sample code 4 this?
TY
Jason Shohet
 
Back
Top