This is a migrated thread and some comments may be shown as answers.

How to Save the State of Rad Control in Postback

1 Answer 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Priyal
Top achievements
Rank 1
Priyal asked on 02 Dec 2010, 01:20 AM

Hi,

I have a master page with Rad Tree View. I also got few chid pages.  I use previous page properties for my methods.
All tree nodes are bounded to child web pages. when a Tree node is selected related child web page is populated on the main container. All child pages are used a common toolbar on the Master Page. when user select a row of the Radgrid (in the child page) and click edit button it will open edit web page with selected row data. (see images)

I want to save state(seleted values) of all the controls in a web page when user navigate back and forth using browser back button and postbacks to same page.

 

Could you please let me know which methods I can use in order to accomplish my requirement? I am really appreciated if you can help me solve my issues.

Pri

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 07 Dec 2010, 11:49 AM
Hi Pri ,

I've already answered to the support ticket regarding this issue.

The treeview is supposed to save its state when the page postbacks. This doesn't happen only when NavigateUrl is set and the page navigates. In this case a new page is opened with a different instance of the treeview. You can select the clicked node like this:

RadTreeNode clickedNode = RadTreeView2.FindNodeByUrl(Request.Url.PathAndQuery);
if (clickedNode != null)
{
    clickedNode.ExpandParentNodes();
    clickedNode.Selected = true;
}

Best wishes,
Yana
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
General Discussions
Asked by
Priyal
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or