How To Save State of TreeView Collapse & expand (NavigationTreeView)

Topics: Web Client Software Factory
Jan 21, 2010 at 8:48 AM

How To Save State of TreeView Collapse & expand (NavigationTreeView).

Thanks

Chris

Jan 22, 2010 at 4:30 AM

Ok, I'll answer my question:

on DefaultMaster.master.cs use below events:

protected void NavigationTreeView_Unload(object sender, EventArgs e)
        {
            SaveTreeView(NavigationTreeView);
        }

        protected void NavigationTreeView_DataBound(object sender, EventArgs e)
        {
            RestoreTreeView(NavigationTreeView);
        }



Hope this will help.

br,
ca

protected void NavigationTreeView_Unload(object sender, EventArgs e)
        {
            new TreeViewState().SaveTreeView(NavigationTreeView);
        }

        protected void NavigationTreeView_DataBound(object sender, EventArgs e)
        {
            // NavigationTreeView.CollapseAll();

            // get the saved state of all nodes.
            new TreeViewState().RestoreTreeView(NavigationTre
protected void NavigationTreeView_Unload(object sender, EventArgs e)
        {
            SaveTreeView(NavigationTreeView);
        }

        protected void NavigationTreeView_DataBound(object sender, EventArgs e)
        {
            RestoreTreeView(NavigationTreeView);
        }
eView);
        }
Feb 11, 2010 at 5:13 AM

On the Second thought, the above seems not to working, sorry.


I tried this link which is working on a normal asp.net page but not in WCSF. =(
http://blog.binaryocean.com/PermaLink,guid,23808645-43b5-4e2a-afb1-53dc8da35636.aspx


Anyone, please help.

br,

Chris