Required Field Validator doesn't work with RadNumericTextBox on the page

Thread is closed for posting
2 posts, 0 answers
  1. Thiago
    Thiago avatar
    1 posts
    Member since:
    Aug 2010

    Posted 31 Aug 2010 Link to this post

    Hello,

    I have two RadNumericTextBox on my page and a RadScriptManager. These components don't have a RequiredFieldValidator, but others on the same page have.

    Theses validators are not working and it started hapenning after the inclusion of the RadNumericTextBox.

    I took the RadNumeric out and the validators started working again.

    Has someone ever seen a situation like this?

    My code:
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        EnableScriptLocalization="True">
        </telerik:RadScriptManager>
     
        <div>
     
            <table cellpadding="0" cellspacing="0" width="100%">
         
                <tr>
                    <td>  </td>
                </tr>
     
                <tr>
                    <td><strong>Cadastro de educação </strong></td>
                </tr>
     
                <tr>
                    <td>  </td>
                </tr>
     
                <tr>
                    <td>Nome: 
                        <asp:Label ID="lblNome" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
     
                <tr>
                    <td>  </td>
                </tr>
     
                <tr>
                    <td>Tipo:  <asp:DropDownList ID="dropTipo" runat="server"
                            onselectedindexchanged="dropTipo_SelectedIndexChanged" AutoPostBack="True"
                            DataSourceID="sqlTiposEducacao" DataTextField="tipoFluxo_desc"
                            DataValueField="tipoFluxo_id">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="sqlTiposEducacao" runat="server"
                            ConnectionString="<%$ ConnectionStrings:GCConnectionString %>"
                            SelectCommand="SELECT * FROM tipofluxo WHERE tipofluxo_id >= 1 and tipofluxo_id <= 8"></asp:SqlDataSource>
                               
                        <asp:Label ID="lblEspecifique" runat="server" Text="Especifique:" Visible="false"></asp:Label
                        <asp:TextBox ID="txtEspecifique" runat="server" Width="260px" Visible="false"
                            ValidationGroup="form"></asp:TextBox>
                      
                    </td>
                </tr>
     
                <tr>
                    <td>  </td>
                </tr>
     
                <tr>
                    <td>
                        Data de início:  <asp:TextBox ID="txtDataInicio" runat="server" ValidationGroup="form"
                            ></asp:TextBox>
                        mm/aaaa 
                        <asp:RequiredFieldValidator ID="rfvDataInicio" runat="server"
                            ControlToValidate="txtDataInicio" ErrorMessage="*" ValidationGroup="form"></asp:RequiredFieldValidator>
                        </td>
                </tr>
     
                <tr>
                    <td>  </td>
                </tr>
     
                <tr>
                    <td>
          Data de término:  <asp:TextBox ID="txtDataTermino" runat="server" ValidationGroup="form"
                            ></asp:TextBox>
                        mm/aaaa  <asp:RequiredFieldValidator ID="rfvDataTermino" runat="server"
                            ControlToValidate="txtDataTermino" ErrorMessage="*" ValidationGroup="form"></asp:RequiredFieldValidator>
                        </td>
                </tr>
     
                <tr>
                    <td>  </td>
                </tr>
     
                <tr>
                    <td>
                        Valor anual:   
                        <telerik:RadNumericTextBox ID="txtValorAnual" runat="server" Culture="pt-BR"
                            Type="Currency" Width="125px" >
                        </telerik:RadNumericTextBox>
                           
                             
                        ou Valor mensal:  
                        <telerik:RadNumericTextBox ID="txtValorMensal" runat="server" Culture="pt-BR"
                            Type="Currency" Width="125px" >
                        </telerik:RadNumericTextBox>
                           
                    </td>   
                </tr>
     
                <tr>
                    <td>  </td>
                </tr>
     
                 <tr>
                    <td align="center" class="style1">
                        <asp:LinkButton ID="btnSalvar" runat="server" Text="Salvar"
                             onclick="btnSalvar_Click" ValidationGroup="form"/>
                             
                        <asp:LinkButton ID="btnExcluir" runat="server" Text="Excluir"
                            onclick="btnExcluir_Click" />
                                 
                        <asp:HyperLink ID="linkCancelar" runat="server" NavigateUrl="~/educacao.aspx">Cancelar</asp:HyperLink>
                        </td>
                </tr>
     
            </table>
     
        </div>
             
     
    </asp:Content>


    Tks,

    Sorry for my poor english.

    Thiago
  2. Dimo
    Admin
    Dimo avatar
    8385 posts

    Posted 31 Aug 2010 Link to this post

    Hi Thiago,

    I don't see any difference in the page behavior with and without RadNumericTextBoxes. Here is my test page.

    <%@ Page Language="C#" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <script runat="server">
     
    </script>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     
    <head runat="server">
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <title>RadControls</title>
    </head>
    <body>
    <form id="form1" runat="server">
     
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        EnableScriptLocalization="True">
        </telerik:RadScriptManager>
      
        <div>
      
            <table cellpadding="0" cellspacing="0" width="100%">
          
                <tr>
                    <td>  </td>
                </tr>
      
                <tr>
                    <td><strong>Cadastro de educação </strong></td>
                </tr>
      
                <tr>
                    <td>  </td>
                </tr>
      
                <tr>
                    <td>Nome:
                        <asp:Label ID="lblNome" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
      
                <tr>
                    <td>  </td>
                </tr>
      
                <tr>
                    <td>Tipo:  <asp:DropDownList ID="dropTipo" runat="server"
                            AutoPostBack="True"
                            >
                        </asp:DropDownList>
                                
                        <asp:Label ID="lblEspecifique" runat="server" Text="Especifique:" Visible="false"></asp:Label>
                        <asp:TextBox ID="txtEspecifique" runat="server" Width="260px" Visible="false"
                            ValidationGroup="form"></asp:TextBox>
                       
                    </td>
                </tr>
      
                <tr>
                    <td>  </td>
                </tr>
      
                <tr>
                    <td>
                        Data de início:  <asp:TextBox ID="txtDataInicio" runat="server" ValidationGroup="form"
                            ></asp:TextBox>
                        mm/aaaa
                        <asp:RequiredFieldValidator ID="rfvDataInicio" runat="server"
                            ControlToValidate="txtDataInicio" ErrorMessage="*" ValidationGroup="form"></asp:RequiredFieldValidator>
                        </td>
                </tr>
      
                <tr>
                    <td>  </td>
                </tr>
      
                <tr>
                    <td>
          Data de término:  <asp:TextBox ID="txtDataTermino" runat="server" ValidationGroup="form"
                            ></asp:TextBox>
                        mm/aaaa  <asp:RequiredFieldValidator ID="rfvDataTermino" runat="server"
                            ControlToValidate="txtDataTermino" ErrorMessage="*" ValidationGroup="form"></asp:RequiredFieldValidator>
                        </td>
                </tr>
      
                <tr>
                    <td>  </td>
                </tr>
      
                <tr>
                    <td>
                        Valor anual:  
                        <telerik:RadNumericTextBox ID="txtValorAnual" runat="server" Culture="pt-BR"
                            Type="Currency" Width="125px" >
                        </telerik:RadNumericTextBox>
                            
                              
                        ou Valor mensal: 
                        <telerik:RadNumericTextBox ID="txtValorMensal" runat="server" Culture="pt-BR"
                            Type="Currency" Width="125px" >
                        </telerik:RadNumericTextBox>
                            
                    </td>  
                </tr>
      
                <tr>
                    <td>  </td>
                </tr>
      
                 <tr>
                    <td align="center" class="style1">
                        <asp:LinkButton ID="btnSalvar" runat="server" Text="Salvar"
                             ValidationGroup="form"/>
                              
                        <asp:LinkButton ID="btnExcluir" runat="server" Text="Excluir"
                           />
                                  
                        <asp:HyperLink ID="linkCancelar" runat="server" NavigateUrl="~/educacao.aspx">Cancelar</asp:HyperLink>
                        </td>
                </tr>
      
            </table>
      
        </div>
     
    </form>
    </body>
    </html>


    Greetings,
    Dimo
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top