TabString Load On Demand

5 posts, 0 answers
  1. João
    João avatar
    5 posts
    Member since:
    Jun 2010

    Posted 08 Jun 2010 Link to this post

    Hi there.

    I Have found a problem in your LoadOnDemand Example,  try to change the selected index to the last tab like this:

          
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="2" OnPageViewCreated="RadMultiPage1_PageViewCreated" CssClass="multiPage"
                    </telerik:RadMultiPage> 
                    <telerik:RadTabStrip OnClientTabSelecting="onTabSelecting" ID="RadTabStrip1" SelectedIndex="2" CssClass="tabStrip" 
                        runat="server" MultiPageID="RadMultiPage1" Skin="Office2007" OnTabClick="RadTabStrip1_TabClick" Orientation="HorizontalBottom"
                    </telerik:RadTabStrip> 


    And in the code-behind change to:
        protected void Page_Load(object sender, System.EventArgs e) 
            { 
                if (!Page.IsPostBack) 
                { 
                    AddTab("Customers"); 
                    //AddPageView(RadTabStrip1.FindTabByText("Customers")); 
                    AddTab("Products"); 
                    AddTab("Orders"); 
                    AddPageView(RadTabStrip1.FindTabByText("Orders")); 
                } 
            } 


    The last tab although is selected, the user control is not loaded and you have to select another tab and then return to it.

    I'm using RadControls for ASP.NET AJAX Q1 2010, and i need, under certain conditions, start on another tab and not on the 1st one.

    Thks.
    João Matos.



  2. Yana
    Admin
    Yana avatar
    5044 posts

    Posted 10 Jun 2010 Link to this post

    Hi João,

    The SelectedIndex property of the multipage should be set to "0", because actually it has only one pageview when the page loads for the first time:

    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" CssClass="multiPage">
    </telerik:RadMultiPage>
    <telerik:RadTabStrip OnClientTabSelecting="onTabSelecting" ID="RadTabStrip1" SelectedIndex="2" CssClass="tabStrip" runat="server" MultiPageID="RadMultiPage1" Skin="Office2007" OnTabClick="RadTabStrip1_TabClick" Orientation="HorizontalBottom">
    </telerik:RadTabStrip>

    Kind regards,
    Yana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. João
    João avatar
    5 posts
    Member since:
    Jun 2010

    Posted 13 Jun 2010 Link to this post

    Yes, but if you check the code i just add the pageview to the third tab, and it should be possible to have this tab selected in the first time instead of always having to start in the first tab.

    This way i would still load one tab at a time whenever i press another tab. Altough i undearstead that i only have one pageview in the multipage i think it should be possible to have this pageview linked to the tab i want when the page loads.

    Thks.
    João Matos.
  4. Yana
    Admin
    Yana avatar
    5044 posts

    Posted 14 Jun 2010 Link to this post

    Hello João,

    I understand your requierement  and I've set SelectedIndex of the tabstrip to "2", but SelectedIndex of the multipage should be set to "0", because there's only one pageview when the page loads for the first time.

    Regards,
    Yana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. João
    João avatar
    5 posts
    Member since:
    Jun 2010

    Posted 14 Jun 2010 Link to this post

    That solved the issue.

    Regards.
    João Matos.


Back to Top