Page_Load issue

P

Paul

Hi,
I am relatively knew to the ASP .Net world, so I may be going about this all
wrong, but I need to figure this out anyway.

I am using a IE Web Controls TreeView. I have a class that manages the
TreeView and syncs it with the data that I have in some objects that
correspond to the TreeView Nodes. I have put the TreeView in a Web Control.
In the control, I utilize a class that manages the data for the TreeView.

So in other words, the desired behavior is this: The User changes the Node
on the TreeView. That Node corresponds to an object in my app (i will call
is myAppObject). So the object manager (myAppObjectManager) will have
((myAppObjectManager.CurrentSelection.Name == TreeView1.Node.Node.Text) =
true) (semi-psuedo C# code). In other words, there is a one to one
correspondence in this relationship (furthermore, myAppObject is not a
TreeNode).

The problem is that as soon as a Node is expanded or a Node Selection
changes, the webform (that contains the custom treeview control) rerenders
before the TreeView1_Expand or TreeView1_SelectionChaged fires (in the
custom control). It is in those events that i call myAppObjectManager and
set its current selection. So when the webform rerenders is has the
previous selection for myAppObjectManager.CurrentSelection (because the
event fired after the last time the page rerendered).

I have tried firing an event once the data in
myAppObjectManager.CurrentSelection changes. The event fires, but only
after the page has rerendered (so consequently, the webform never has the
true myAppObjectManager.CurrentSelection).

I have been tring to use RaisePostBackEvent in myAppObjectManager, but I
cannot get this to work correctly either.

My desire is to have the data update, then the page rerenders. Is this
possible? If not, how can i force a refresh? Or force a redirect to itself
(webform).

Thanks for the help,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top