Home - Forums-.NET - FlyTreeView (ASP.NET) - selectednode event

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

selectednode event
Link Posted: 14-Jun-2011 09:43
When I use the following code:

Dim newNodeValue As String = e.Node.Value
        Dim oldNodeValue As String
        If e.OldNode IsNot Nothing Then
            oldNodeValue = e.OldNode.Value
        Else
            oldNodeValue = "none"
        End If
        Choice.Text = Server.HtmlEncode(String.Format("{0} (from {1})", newNodeValue, oldNodeValue))

On the first selection I get:

System.Data.DataRowView (from none)

All subsequent selection are:

System.Data.DataRowView (from System.Data.DataRowView)

Choice is a

What am I doing wrong?  Thanks for your help.
Link Posted: 20-Jun-2011 07:29
Looks like you are performing databinding somewhere, so it puts DataRowView when no DataTextField in treeview node bindings defined.
Link Posted: 20-Jun-2011 09:30
I'm using:

        Dim hierarchicalData As IHierarchicalEnumerable = NineRays.WebControls.FlyTreeView.ConvertTabularDataToHierarchical(DSet, "NodeID", "NodePARENT")
        FlyTreeView1.DataSource = hierarchicalData
        FlyTreeView1.DataBind()

So I am databinding. It does not work if you don't?

I'm also using:

NineRays:FlyNodeBinding TextField="NodeHTML" Depth="0" ToolTip="Click to Select" ValueField="NodeID"

in the  section. The textfield is working as everything is displayed correctly but the valuefield= I guess is not.