Reloading Tab Page Views

2 posts, 1 answers
  1. macmariman
    macmariman avatar
    10 posts
    Member since:
    Apr 2008

    Posted 28 May 2008 Link to this post

    Hello all,

    I have successfully implemented load on demand within a radtabstrip as shown in the demos. This allows me to load pageviews on clicking the corresponding tab as well as preventing a postback if the content has already been loaded before by using the following code:

     if (args.get_tab().get_pageView()) 

    Now, I'd like to restore the initial behaviour (allow postback) by clicking on the corresponding button allowing the pageviews contents to be binded to different data.
    Any Ideas??



  2. Answer
    Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 29 May 2008 Link to this post

    Hello Martin Mari,

    To restore the initial behavior you need to execute the following JavaScript code for that particular tab:

    var tab = $find("RadTabStrip1").get_tabs().getTab(1);

    Then on the server side you need to add a check inside the TabClick event handler to avoid multiple instantiation of the same RadPageView object:

            protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
                if (string.IsNullOrEmpty(e.Tab.PageViewID))
                e.Tab.PageView.Selected = true;

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top