Home - Forums-.NET - FlyTreeView (ASP.NET) - Accessing FlyTreeView Nodes in OnInit

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Accessing FlyTreeView Nodes in OnInit
Link Posted: 29-Feb-2008 09:06
During a postback, is it possible to access the FlyTreeView nodes?  I know the control doesn't get populated with the viewstate info until between the OnInit and OnLoad events, but I was hoping there may be another way to access the currently selected node during the OnInit event.

Thanks
Link Posted: 29-Feb-2008 09:15
This is general ASP.NET approach: any control does not have viewstate/post data at OnInit. The loadpostdata/loadviewstate step occurs after OnInit.
So you can get the current state of treeview at Page_Load.
The only chance for OnInit is to parse form post data to get the latest selected event of treeview, but this doesn't look trivial.