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

getting last tab in client code

1 Answer 82 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Khanh Nguyen
Top achievements
Rank 1
Khanh Nguyen asked on 01 Feb 2010, 06:17 PM
Hi,
i have multiple tabs, with children tabs underneath.

if you are in tab1, you see tab1's children

TAB1 tab2
tab1_1  tab1_2 tab1_3

when clicking to tab2, i click tab2_3

tab1 TAB2
tab2_1 tab2_2 tab2_3

now click back to tab1, then click to tab2, how do i get current tab which is ( tab2_3 ) ?

visually i see that tab2_3 is selected, but the code to determine which tab is selected used below,
always tells me it's tab2_1, not tab2_3


      function onTabSelected(sender, args) { 
        alert(args.get_tab().get_value()); 
 
        return;} 

thanks.



1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 03 Feb 2010, 07:51 AM
Hello Khanh,

Please try it like this:

<script type="text/javascript">
    function tabSelected(sender, args) {
         
        if(args.get_tab().get_level() == "0" && args.get_tab().get_selectedTab())
            alert(args.get_tab().get_selectedTab().get_value());
    }
</script>


All the best,
Yana
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
TabStrip
Asked by
Khanh Nguyen
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or