Home - Forums-.NET - FlyTreeView (ASP.NET) - NodeSelected Event does not return the curent seleted node!

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

NodeSelected Event does not return the curent seleted node!
Link Posted: 31-May-2009 09:16
Hi, e.Node.Value.ToString in the NodeSelected event return the prevous selected node not the current selected one!


Public Sub flyTreeView_NodeSelected(ByVal sender As Object, ByVal e As NineRays.WebControls.FlyTreeNodeEventArgs) Handles flyTreeView.NodeSelected
            Dim strSelected As String = e.Node.Value.ToString
            ..
End sub

What I'm doing wrong?
Link Posted: 31-May-2009 21:58
FlyTreeView.NodeSelected event is fired multiple times during postback.
As any other NodeXXX event it is thrown one by one while treeview applies client-side changes to its server reflection.

Are you sure you need NodeSelected event.
In case when you need to handle selection change (as a single event) you should use SelectedNodeChanged event instead.