Select Tab in code behind

5 posts, 0 answers
  1. Beshoy
    Beshoy avatar
    6 posts
    Member since:
    May 2013

    Posted 16 Jul 2013 Link to this post

    Hi,
    I want to select specific tab in code behind.
    Thanks in advance
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Jul 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Beshoy
    Beshoy avatar
    6 posts
    Member since:
    May 2013

    Posted 16 Jul 2013 Link to this post

    Thanks for reply 
    but my ribbonbar doesn`t have this property "SelectedTabIndex"
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Jul 2013 Link to this post

    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.
  6. Beshoy
    Beshoy avatar
    6 posts
    Member since:
    May 2013

    Posted 21 Jul 2013 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017