eclamation when validating

4 posts, 0 answers
  1. Milosz
    Milosz avatar
    24 posts
    Member since:
    Jun 2009

    Posted 08 Sep 2009 Link to this post

    hi all
    is it possible to set inputs like datepickers when we write wrong date format? i would like to have that nice exclamation when validating input e.g. using RequiredFieldValidator
  2. Dimo
    Admin
    Dimo avatar
    8450 posts

    Posted 08 Sep 2009 Link to this post

    Hello Milosz,

    The desired functionality is supported only with asp:CustomValidators. You need to do some Javascript coding as well:

    http://www.telerik.com/community/forums/aspnet-ajax/input/showing-error-style-programmatically.aspx#710331

    The above example is with RadInput textboxes. The RadDatePicker uses internally a RadDateInput textbox, which can be referenced with this client method:

    picker.get_dateInput()

    so the approach is basically the same.


    All the best,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Milosz
    Milosz avatar
    24 posts
    Member since:
    Jun 2009

    Posted 08 Sep 2009 Link to this post

    ok thanks for that link, i just want to set invalidstyle for all controls in my form (RadNumericTextBox, RadTextbox) the same as in RadDatePicker (RadDateInput) when field is required.

    sender.get_styles().EnabledStyle[1] += " riEmpty"; 

    is it that style?
  4. Dimo
    Admin
    Dimo avatar
    8450 posts

    Posted 08 Sep 2009 Link to this post

    Hello Milosz,

    The default invalid CSS class is riError :

    sender.get_styles().EnabledStyle[1] += " riError";

    Apart from setting it to "EnabledStyle", you can also do the same for the "HoverStyle" and/or "FocusedStyle" - it's according to your preference

    Kind regards,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top