TabStrip and MultiPage placed in different ContentPlaceHolder using Master page

Thread is closed for posting
1 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 01 Mar 2011 Link to this post

    Requirements

    RadControls version

    All
    .NET version

    2.0 +
    Visual Studio version

    2005 +
    programming language

    C#
    browser support

    all browsers supported by RadControls


    PROBLEM
    TabStrip and MultiPage placed in different ContentPlaceHolder using Master page. RadTabStrip and RadMultiPage which are under two different content place holders in a page that uses a Master page, do not seem to communicate. A click on a tab does not switch the displayed PageView as expected.

    SOLUTION
    1. From code behind set the ClientID property of the MultiPage as a custom attribute of the TabStrip.
    2. Set the selected index of the MultiPage to that of the currently selected Tab in the client-side TabSelected event handler of the TabStrip:
    function onTabSelected(sender, eventArgs) {
        var multiPage = $find(sender.get_attributes().getAttribute("multiPageId"));
        var tabIndex = eventArgs.get_tab().get_index();
     
        multiPage.set_selectedIndex(tabIndex);
    }
Back to Top