Home - Forums-.NET - FlyTreeView (ASP.NET) - Casting FlyHierarchyData ?

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Casting FlyHierarchyData ?
Link Posted: 19-Feb-2009 04:22
I have the following code:

protected void flyTreeView1_NodeDataBound( object sender, FlyTreeNodeEventArgs e)
    {
       string s = e.Node.DataItem.GetType().ToString();
    }


When I step thru this in debug  the value of s is
"NIneRays.WebControls.FlyHierarchyData"  
How shall I cast this to get at the data ?

Thanks,

George.
Link Posted: 19-Feb-2009 04:28
You can cast like this:
object originalTabularDataItem = ((IHierarchyData)e.Node.DataItem).Item;
Link Posted: 19-Feb-2009 04:46
OK !  
I casted the object to a DataRowView and now I'm in business.

Now from the drop event I can re-order the data in the database
with an AJAX call.   Sweet.

Thanks for your fast reply.

George.