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

Open tab from code-behind

1 Answer 200 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 04 Jun 2015, 06:44 PM

Hello,

I have a tabstrip that is dynamically created based on values in a table in a database.  There are several child tabs as well (up to three levels).  When I click on a tab a web user control is dynamically loaded into the RadMultiPage.  One of these web user controls contains a RadGrid that has a button column.  When the user clicks this button I want to switch to a new tab and I'd like to do this from code-behind.  Is this possible?  If it is, how?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 05 Jun 2015, 01:49 PM
Hello,

I am attaching a sample project to this reply, which demonstrates how you can change the selected RadTab and RadPageView from a button embedded in a RadGrid.

Please, review the code in the RadButton1_Click handler in the WebUserControl code-behind and note how the RadTabStrip and RadMultiPage are accessed. We are setting the SelectedIndex property of both so that the RadTab and the RadPageView we want to display are both selected.

Telerik.Web.UI.dll is not included in the bin folder in order not to exceed the maximum allowed attachment size.

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TabStrip
Asked by
Shawn
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or