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

Select Tab in code behind

4 Answers 93 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Beshoy
Top achievements
Rank 1
Beshoy asked on 16 Jul 2013, 08:50 AM
Hi,
I want to select specific tab in code behind.
Thanks in advance

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Jul 2013, 11:28 AM
Hi Beshoy,

Please have a look at the following full code I tried which works fine ay my end.

ASPX:
<telerik:RadRibbonBar ID="RadRibbonBar1" runat="server">
    <telerik:RibbonBarTab Text="tab1">
        <telerik:RibbonBarGroup Text="group1">
            <Items>
                <telerik:RibbonBarButton Size="Medium" Text="button1" />
            </Items>
        </telerik:RibbonBarGroup>
    </telerik:RibbonBarTab>
    <telerik:RibbonBarTab Text="tab2">
        <telerik:RibbonBarGroup Text="group2">
            <Items>
                <telerik:RibbonBarButton Size="Medium" Text="button2" />
            </Items>
        </telerik:RibbonBarGroup>
    </telerik:RibbonBarTab>
    <telerik:RibbonBarTab Text="tab3">
        <telerik:RibbonBarGroup Text="group3">
            <Items>
                <telerik:RibbonBarButton Size="Medium" Text="button3" />
            </Items>
        </telerik:RibbonBarGroup>
    </telerik:RibbonBarTab>
</telerik:RadRibbonBar>
<br /><br />
<telerik:RadButton ID="RadButton1" runat="server" Text="Set Select"
    onclick="RadButton1_Click">
</telerik:RadButton>

C#:
protected void RadButton1_Click(object sender, EventArgs e)
{
    RadRibbonBar1.SelectedTabIndex = 1;  //here selecting the second tab as index start from zero.
}

Thanks,
Shinu.
0
Beshoy
Top achievements
Rank 1
answered on 16 Jul 2013, 12:31 PM
Thanks for reply 
but my ribbonbar doesn`t have this property "SelectedTabIndex"
0
Shinu
Top achievements
Rank 2
answered on 17 Jul 2013, 06:34 AM
Hi Beshoy,

I have checked the same code in the latest version of Telerik RadControls for ASP.NET AJAX as well as in the Q2 2012 version and its working fine at my end. Can you please post the full code you tried?

Thanks,
Shinu.
0
Beshoy
Top achievements
Rank 1
answered on 21 Jul 2013, 07:28 AM
Hi Shinu,
Thank you for ur help
 - I find out that i`m in an old version of controls which does not  have this property.

Best Regards
Tags
RibbonBar
Asked by
Beshoy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Beshoy
Top achievements
Rank 1
Share this question
or