This is a migrated thread and some comments may be shown as answers.

Tab Change (Client side script)

1 Answer 53 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Kajal
Top achievements
Rank 1
Kajal asked on 26 Dec 2012, 12:03 PM
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

1 Answer, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 27 Dec 2012, 02:18 PM
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.
Tags
RibbonBar
Asked by
Kajal
Top achievements
Rank 1
Answers by
Helen
Telerik team
Share this question
or