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

Switch tab from C# code.

1 Answer 169 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Needha
Top achievements
Rank 1
Needha asked on 30 Nov 2013, 02:40 AM
Hi

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
Needha

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 30 Nov 2013, 05:08 AM
Hi Needha,

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

C#:
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.
Thanks,
Shinu.

Tags
TabStrip
Asked by
Needha
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or