option required

2 posts, 0 answers
  1. Hector Hernandez
    Hector Hernandez avatar
    45 posts
    Member since:
    Oct 2009

    Posted 08 Oct 2015 Link to this post

    I have some asp text box in each of one i use a property call required like this 

    1.<asp:TextBox runat="server" ID="TxtCorreoVal" CssClass="form-control" required>

    and in the css i use this, i upload an image of how it looks in a normal textbox i want use the same functionality on RadDatePicker and RadComboBox

    how can i do this

    01.input:required:invalid, input:focus:invalid {
    02.    background-image: url(../imagenes/required.png);
    03.    background-position: right top;
    04.    background-repeat: no-repeat;
    05.    -moz-box-shadow: none;
    06.  }
    07.  input:required:valid {
    08.    background-image: url(../imagenes/Ok.png);
    09.    background-position: right top;
    10.    background-repeat: no-repeat;
    11.  }

     ​

     Thank for your time

     

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 12 Oct 2015 Link to this post

    Hello Hector,

    The TextBox is a simple control that renders one single INPUT element, which is the reason that you are able to use the required attribute on it. However, with RadDatePicker and RadComboBox this will not be possible and you have to use RequiredFieldValidator or CustomValidator controls for your validation.

    In the following online demo you will find an example for validating RadDatePicker and RadComboBox controls:
    Hope this helps.


    Regards,
    Konstantin Dikov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top