<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" />

        <telerik:RadNumericTextBox ID="txtClientIDSelect" runat="server" AutoPostBack="false"
            DataType="System.Int32" ValidationGroup="Submit" _OnTextChanged="txtClientIDSelect_TextChanged"
            MaxLength="6" Width="150px" onkeyup="NumericValue1KeyDown(this,event)">
            <NumberFormat ZeroPattern="n" AllowRounding="False" DecimalDigits="0" DecimalSeparator="#" GroupSeparator=""
                GroupSizes="6"></NumberFormat>

        </telerik:RadNumericTextBox>
        <asp:RequiredFieldValidator ID="reqClientID" runat="server" ControlToValidate="txtClientIDSelect" ValidationGroup="Submit"
            ErrorMessage="ClientID is required." ToolTip="ClientID is required." InitialValue="--Select--"
            SetFocusOnError="True">*</asp:RequiredFieldValidator>
        <%-- <asp:TextBox ID="txtClientIDSelect" runat="server"></asp:TextBox>--%>

        <asp:Button ID="btnSubmitClient" runat="server" Text="SUBMIT" ValidationGroup="Submit"
            _OnClick="btnSubmitClient_Click" />

        <script type="text/javascript">

            function NumericValue1KeyDown(sender, e) {
                var key = e.keyCode;
                var textCount = 0;
                textCount = document.getElementById('<%= txtClientIDSelect.ClientID %>').value
                //setTimeout(function() { }, 200);
            if (textCount.length >= 6) {
                document.getElementById('<%=btnSubmitClient.ClientID %>').disabled = false;
                document.getElementById('<%=btnSubmitClient.ClientID %>').focus();
            }
        }
        </script>

    </form>
</body>
</html>
