E
Eamon Millman
Greetings,
I'm fairly new to the new ASP.NET 2.0 controls and I'm trying to get the
TreeView control to display some non-xml/sitemap data I want to have in a
tree format. To accomplish this I have followed the sample code provided on
the MSDN website for writing a custom HierarchicalDataSourceControl,
HierarchicalDataSourceView, IHierarchicalEnumerable, and IHierarchyData
implementations (their FileSystem example).
Now the TreeView renders the proper nodes, even places the correct field
values for Text and ToolTip that I set in the Databindings. However, I
cannot seem to access the IHierarchyData object that was used to get all
this data. I've examined the TreeView1.SelectedNode when I handle the
TreeView.SelectedNodeChanged event but I can't see where the data is. I'm
assuming it should be accessible as the SelectedNode.DataItem, but this
value is always null.
Does anyone have suggestions for me to look at? I've looked up the
HierarchicalDataBoundControl and will probably pursue it as a possible
solution for the time being. If you want a look at the code for all this let
me know and I'll get it to you.
Eamon Millman
The MSDN articles I've worked from are:
http://msdn2.microsoft.com/library/system.web.ui.hierarchicaldatasourcecontrol.aspx
http://msdn2.microsoft.com/library/system.web.ui.webcontrols.treenodebinding.aspx
http://msdn2.microsoft.com/library/system.web.ui.webcontrols.hierarchicaldataboundcontrol.aspx
I'm fairly new to the new ASP.NET 2.0 controls and I'm trying to get the
TreeView control to display some non-xml/sitemap data I want to have in a
tree format. To accomplish this I have followed the sample code provided on
the MSDN website for writing a custom HierarchicalDataSourceControl,
HierarchicalDataSourceView, IHierarchicalEnumerable, and IHierarchyData
implementations (their FileSystem example).
Now the TreeView renders the proper nodes, even places the correct field
values for Text and ToolTip that I set in the Databindings. However, I
cannot seem to access the IHierarchyData object that was used to get all
this data. I've examined the TreeView1.SelectedNode when I handle the
TreeView.SelectedNodeChanged event but I can't see where the data is. I'm
assuming it should be accessible as the SelectedNode.DataItem, but this
value is always null.
Does anyone have suggestions for me to look at? I've looked up the
HierarchicalDataBoundControl and will probably pursue it as a possible
solution for the time being. If you want a look at the code for all this let
me know and I'll get it to you.
Eamon Millman
The MSDN articles I've worked from are:
http://msdn2.microsoft.com/library/system.web.ui.hierarchicaldatasourcecontrol.aspx
http://msdn2.microsoft.com/library/system.web.ui.webcontrols.treenodebinding.aspx
http://msdn2.microsoft.com/library/system.web.ui.webcontrols.hierarchicaldataboundcontrol.aspx