Home - Forums-.NET - FlyTreeView (ASP.NET) - Checkbox behavior / event order

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Checkbox behavior / event order
Link Posted: 15-Feb-2007 06:03
.
Link Posted: 15-Feb-2007 09:47
Yes, node-level events are fired during LoadPostData control execution lifecycle stage.

There are some reasons for such behavior. One of them is that it is impossible in some cases (node removed, changed its various properties, etc) to fire node change events in RaiseChangedEvents . For example, node was checked and then it was deleted from treeview. So how would you handle this scenario. It means that you need to know what was current treeview state (when this node event was logged at client-side).

So all these node events fire during LoadPostData synchronously with application of all client-side changes to treeview state (expanded, checked, removed, inserted, etc.)

As far as I understand your problem, you can use FlyTreeView.GetCheckedNode(radiouGroup) method in order to get checked node for required radio group.

Or you can create a helper Page class  collection field where you can store checked nodes collected during LoadPostData treeview events. And use it in Page_Load or later.
Link Posted: 15-Feb-2007 11:36
.
Link Posted: 15-Feb-2007 12:42
Generally this is an architectural problem.
The developer very often needs to have treeview state information when he handles event. It is impossible to store a separate copy of treeview (with all its nodes copies, etc.) for every client-side event to be handled at server-side.

If possible, we have events that are fired in RaiseChangedEvents, like SelectedNodeChanged. As you can mention there is also NodeSelected event.
Thus SelectedNodeChanged event is a cumulative representation of subsequent NodeSelected events.

I believe that GetCheckedNode(radioGroup) will cover most of radiobutton scenarios. If not, then we're always ready to extend treeview functionality.