1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / ContentView inside RadTabStrip not preserving the initial index on come back

ContentView inside RadTabStrip not preserving the initial index on come back

4 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    04 Nov 2009
    Link to this post
    Hi,

    I have placed one ContentView or NewView in list mode inside one RadTabStrip. When i see the detail view and come back I'm not in the correct page index but inside the default RadTabStrip index. Exist some way to preserve the correct Tab index (and scroll level) if you return to initial page?

    Thanks. Romi.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    04 Nov 2009
    Link to this post
    Hello Pierre,

    RadTabStrip is an AJAX control and when you make a postback clicking on the wrapped inside the RadMultiPages control the control looses its states. Also you make a redirect to a new page and the url is changed. You can use QueryStrings to determine the last click tab and set the selected tab.

    Sample code:

    void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
       {
           string index = RadTabStrip1.SelectedIndex.ToString();
           string url = "~/SF.aspx" + "?tab=" + index;
           string currentUrl = HttpContext.Current.Request.Url.ToString();
           currentUrl = url;
           Response.Redirect(currentUrl);
       }


    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    04 Nov 2009
    Link to this post
    Hi Ivan,

    Thanks but the problem is more complex because we need to define the SimplePageUrl back side in the NewsView or ContentView derived class  and here you are not access to the Radtabstrip index in this class. May be my implementation ContentView is not complete. I don't have extend my contentView including Radtabstrip inside but only added my custom contentview in one radtabstrip in my master page.

    Regards.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    04 Nov 2009
    Link to this post
    Hi Pierre,

    Since you use RadTabStrip control you should be able to subscribe for TabClick event. The content view does not matter here

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered