Hi Flyguy,
From your description, you have ASP.NET web pages that use TreeView
control(bound to datasource), however, you find that whenever you rebind
the Treeview with the DataSource, the TreeNodes status(such as expand ,
collapse) will lost, you're looking for some means to keep such status,
correct?
As for the rebinding, how did it happen, is it due to the redirection
during page navigation? For such navigation case, you can consider use
separate frame pages to hold the TreeView navigation menu so as to avoid
reload/rebind on each redirection.
If the problem is due to other things, I think you can try the following
means for keep node status:
**ASP.NET TreeView control's "Nodes" property is a TreeNodeCollection, you
can copy it to an array and cache the array in memory(through cache or
session...)
** When page reload and TreeView rebind, you can loop through the cached
Node Array and assign the proper node status (for the corresponding nodes).
How do you think?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------