validating RadMaskedTextBox

2 posts, 0 answers
  1. Venkata
    Venkata avatar
    3 posts
    Member since:
    Sep 2012

    Posted 26 Feb 2013 Link to this post

    Hi,
         This is prasad, when i click on insert button in RadGrid, RegularExpression validator is fired for RadMaskedTextBox instead of RequiredFeild Validator, How can i validate RadMaskedTextBox with RequiredField Validator.

    Thanks
    M V Prasad
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 27 Feb 2013 Link to this post

    Hi,

    Try the following code.
    aspx:
    <telerik:GridTemplateColumn>
       <EditItemTemplate>
                   <telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server"></telerik:RadMaskedTextBox>
                              <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RadMaskedTextBox1"
                                  ErrorMessage="*"></asp:RequiredFieldValidator>
                          </EditItemTemplate>
                      </telerik:GridTemplateColumn>

    Thanks,
    Princy
Back to Top