Load Associated Controls on Tab selection not onPage Load

2 posts, 0 answers
  1. Brijendra Kumar
    Brijendra Kumar avatar
    38 posts
    Member since:
    Oct 2008

    Posted 02 May 2009 Link to this post

    Dear All,

    I have One tabstrip and a multipage associated with this tabstrip.
    I want to load controls when user selects the tab. Does anyone know how to do it please tell me ...



     

    <telerik:RadTabStrip ID="rdTabCustomer" runat="server" MultiPageID="a">

     

     

     

     

    <Tabs>

     

     

     

     

    <telerik:RadTab Text="Caller" Value="Caller">

     

     

     

     

    </telerik:RadTab>

     

     

     

     

    <telerik:RadTab Text="Customer" Value="Customer">

     

     

     

     

    </telerik:RadTab>

     

     

     

     

    </Tabs>

     

     

     

     

    </telerik:RadTabStrip><telerik:RadMultiPage ID="a" runat="server">

     

     

     

     

    <telerik:RadPageView ID="aa" runat="server">

     

     

     

     

    <General:Generalcc ID="sss" runat="server" />

     

     

     

     

    </telerik:RadPageView>

     

     

     

     

    <telerik:RadPageView ID="RadPageView1" runat="server">

     

     

     

     

    <General:GeneralCustomer ID="GeneralCustomer1" runat="server" />

     

     

     

     

    </telerik:RadPageView>

     

     

     

     

    </telerik:RadMultiPage>


    Thanks & Regards
    Brijendra Pandey    

     

     

     

  2. Alex Lawson
    Alex Lawson avatar
    43 posts
    Member since:
    May 2008

    Posted 14 May 2009 Link to this post


    Personally I use an iframe to load the control on tab click, there are a few other options though.

    You can use the renderselectedpageonly tag in the tabstrip, this is used to optimise page load but requires rework to the tab selection in some scenarios.

    You can dynamically load user controls into the multipage, in C# I use something like this to load an ASCX into a new tab:

     
    PageView newPage = new PageView(); 
    newPage.ID = "pv" + (mpgContents.PageViews.Count).ToString(); 
    newPage.CssClass = "JobList_tabPage"
    mpgContents.PageViews.Add(newPage); 
    Control objControl = LoadControl(userControlName); 
    newPage.Controls.Add(objControl); 


Back to Top