Tab Change (Client side script)

2 posts, 0 answers
  1. Kajal
    Kajal avatar
    2 posts
    Member since:
    Dec 2012

    Posted 26 Dec 2012 Link to this post

    Hi,

    I was checking the RibbonBar control. To my understanding, we can hide / unhide ribbongroup within a bar using client side script (Java script). Is there a way to change the tab dynamically using client side script?



    Regards,
    Kajal
  2. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 27 Dec 2012 Link to this post

    Hi Kajal,

    You may use the following code to change the selected tab index:
    <telerik:RadRibbonBar ID="RadRibbonBar1" runat="server">
        <telerik:RibbonBarTab Text="Items">
            ....................
        </telerik:RibbonBarTab>
        <telerik:RibbonBarTab Text="DropDown Items">
            ....................
        </telerik:RibbonBarTab>
    </telerik:RadRibbonBar>
             
    <script type="text/javascript">
        function pageLoad() {
            var ribbon = $find("<%=RadRibbonBar1.ClientID %>");
            ribbon.set_selectedTabIndex(1);
        }
    </script>



    All the best,
    Helen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top