Setting focus on child tab

3 posts, 0 answers
  1. Bill
    Bill avatar
    175 posts
    Member since:
    Apr 2010

    Posted 04 Nov 2010 Link to this post

    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. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Nov 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bill
    Bill avatar
    175 posts
    Member since:
    Apr 2010

    Posted 06 Dec 2010 Link to this post

    Thanks, that worked.
Back to Top