Open tab from code-behind

2 posts, 0 answers
  1. Shawn
    Shawn avatar
    30 posts
    Member since:
    Jun 2014

    Posted 04 Jun 2015 Link to this post

    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.

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 05 Jun 2015 Link to this post

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