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

Child tab selected is not highlighted

1 Answer 47 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
sudheer
Top achievements
Rank 2
sudheer asked on 09 Apr 2009, 05:27 AM
Hi telerik team,

I have a serious issue with tabstrip child seletion

My scenario is

According to demo of below URL
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/populatingwithdata/hierarchicaldatabinding/defaultcs.aspx


Onpage load
selectedindex=0(politics) for that child links are CNN , NBC , ABC  .in which NBC should get highlighted,also if i select ABC it will get postback and should get highlight(select mode).

please guide how to acheive

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 10 Apr 2009, 12:06 PM
Hello sudheer,

There's quite a difference between navigate and postback. If your tabstrip makes postback on tab click then the clicked tab will be automatically selected after the postback. Still, if you are navigating to new pages while clicking on the tabs, then you will have to manually select the needed tab based on the loaded URL. This can be achieved by using the FindTabByUrl method on Page_Load event, i.e.:

protected void Page_Load(object sender, System.EventArgs e)  
{  
    RadTab tab = RadTabStrip1.FindTabByUrl(Request.Url.PathAndQuery);  
    if (tab != null)  
    {  
        tab.Selected = true;  
        tab.SelectParents();  
        tab.PageView.Selected = true;  
    }  
}  
 


All the best,
Paul
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
TabStrip
Asked by
sudheer
Top achievements
Rank 2
Answers by
Paul
Telerik team
Share this question
or