Tabbing cycle in a rad pane

2 posts, 0 answers
  1. ankool
    ankool avatar
    50 posts
    Member since:
    Apr 2007

    Posted 07 Aug 2008 Link to this post

    I have two panes, one with rad tree and other with multiple textboxes. Now i put focus on first textbox on load and then keep tabbing to next textboxes. But after last textbox the tabbing takes focus to IE address bar. But i want to cycle tab back to first text box.

    Please help me to fix this by adding some property to rad pane.
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 11 Aug 2008 Link to this post

    Hello ankool,
    You are correct - you cannot achieve this result with the currect implementation of the control, but you can easily implement the desired behavior by yourself.

    For example:
    <body>  
        <script type="text/javascript">  
        function MoveFocusToFirstTextBox(e)  
        {  
            var keynum;  
            if(window.event) // IE  
            {  
                keynum = e.keyCode;  
            }  
            else if(e.which) // Netscape/Firefox/Opera  
            {  
                keynum = e.which;  
            }  
              
            if(keynum == 9)  
            {  
                var textBox = $get('<%= TextBox1.ClientID %>');  
                textBox.focus();  
                return false;  
            }  
              
            return true;  
        }  
        </script>  
     
        <form id="form1" runat="server">  
            <asp:ScriptManager ID="ScriptManager1" runat="server" />  
            <telerik:RadSplitter ID="RadSplitter1" runat="server">  
                <telerik:RadPane ID="RadPane1" runat="server">  
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>  
                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>  
                    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>  
                    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>  
                    <asp:TextBox ID="TextBox5" runat="server" onkeydown="return MoveFocusToFirstTextBox(event);"></asp:TextBox>  
                </telerik:RadPane>  
                <telerik:RadPane ID="RadPane2" runat="server"></telerik:RadPane>  
            </telerik:RadSplitter>  
        </form>      
    </body> 


    Kind regards,
    Tsvetie
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top