Jul 23, 2006 10:14 PM|pmccoy|LINK
Thanks to anyone that can help me with this. Before laying out the problem I'm having, I should mention that my project is a web part designed for a Sharepoint Portal. From what I can tell, that limits me to a non-visual implementation of the treeview
and forces me to do everything in a sort of a "code behind" page.
With that said, I have been able to successfully implement the treeview into a web part and it works quite well. The issue I'm having is that the code that generates my tree takes a little while to run and I'd like to minimize the number of postbacks.
More specifically, I would like to limit postbacks to "selectedindexchanged" events only. The problem is that this control appears to be "all or nothing" in terms of events. In other words, if I set autopostback to "false", I can't get the selectedindexchanged
event to fire. If I set autopostback to "true", I get a postback on node expand and collapse events as well as the index changed event.
So, the question is... can I:
- somehow manually force a postback for the selectedinexchanged event when the autopostback is set to "false" or...
- somehow disable the postback for the expand/collapse events when the autopostback is set to "true"?