Switch tab from C# code.

2 posts, 1 answers
  1. Needha
    Needha avatar
    14 posts
    Member since:
    Mar 2013

    Posted 29 Nov 2013 Link to this post


    How can I switch to a radtab from C# code without clicking it? I tried radtabstripid1.FindTabByText("Consumer").Selected=true; This make the tab looks like selected but the tab content has not changed from previous tab.

    Please provide a solution
  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Nov 2013 Link to this post

    Hi Needha,

    Please try the following c# code to select a RadTab and the content inside the tab.

    protected void Page_Load(object sender, EventArgs e)
        RadTab tab = RadTabStrip1.FindTabByText("Tabname");
        //select the tab
        tab.Selected = true;
        //to show the content set the selected property of pageview
        RadPageView page = (RadPageView)RadMultiPage1.FindPageViewByID(tab.PageViewID);
        page.Selected = true;

    Hope this will helps you.

  3. DevCraft R3 2016 release webinar banner
Back to Top