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

Setting focus on child tab

2 Answers 64 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 04 Nov 2010, 02:50 PM
Is there a way to set client side focus on a child tab when the parent tab is selected (something like having the parent tab have a property to set the focus on one of its child tabs)?

If so, do I need to find & manually enable the child tab or will it be auotmatically done as explained above?

Once there, I want to set focus on the first field on the child tab.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Nov 2010, 07:06 AM
Hello William,


Get reference to the first child tab and set as selected in OnClientTabSelected event.

Client code is given.
function OnClientTabSelected(sender, args) {
    var tab = args.get_tab();
    if (tab.get_tabs().get_count() != 0) {
 
        tab.get_tabs().getTab(0).select();
    }
}



-Shinu.
0
Bill
Top achievements
Rank 2
answered on 07 Dec 2010, 01:50 AM
Thanks, that worked.
Tags
TabStrip
Asked by
Bill
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Bill
Top achievements
Rank 2
Share this question
or