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

Server Side Tab Issues

1 Answer 85 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Steen Bray
Top achievements
Rank 1
Steen Bray asked on 27 Jun 2008, 10:48 PM
Hi There,

I have a situation where I have a RadTabStrip, a RadMultiPage control and  RadGridView control.

The content is generated for the RadGridview dynamically. One of the columns is a GridButton Column, and when clicked, I want to catch the click, run a method on another WebUser Control contained in another Tab, and display the other tab.

I have most of this working.  I use the ItemCommand Event to catch the click of the GridButton Column, and use Parent.FindControl to get access to the RadTabStrip, RadMultiPage, and the WebUser control.

The code executes, but the Tab Strip never changes...  I'm not sure what to do to change it.


Here is the code that I execute in the ItemCommand event:

switch (e.CommandName)

{

case "cmdShowRelations":

strUniqueID = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][

"uid"].ToString();

Telerik.Web.UI.

RadTabStrip rts = Parent.FindControl("RadTabStrip1") as RadTabStrip;

RadMultiPage mp = Parent.FindControl("mpPersonsSearch") as RadMultiPage;

ctlFindRelatedPersons frp = Parent.FindControl( "ctlFindRelated" ) as ctlFindRelatedPersons;

frp.LoadRelatedPerson(strUniqueID);

rts.FindTabByText(

"Related").Selected = true;

mp.SelectedIndex = rts.SelectedTab.Index;

break;

}

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 01 Jul 2008, 11:41 AM
Hi Steen,

Actually, your code seems right - setting the Selected and SelectedIndex properties should be enough. However we suspect that you might be using ajax and your are forgetting to update the tabstrip and multipage controls on ajax request. Please check this out and let us know if you have further questions and/or problems.

Greetings,
Paul
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TabStrip
Asked by
Steen Bray
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or