RadInputManager and InvalidCssClass

2 posts, 0 answers
  1. David
    David avatar
    18 posts
    Member since:
    Apr 2008

    Posted 03 Dec 2008 Link to this post

    Using the RadInputManager to style a data entry form form with many asp:Textbox 's on it.  The EnabledCssClass, HoverCssClass, and FocusCssClass properties all appear to be working as expected.  However, I set the InvalidCssClass property does not appear to get used at all.  My aim was to style the textboxes with a custom background and border to indicate those fields left blank.  The fields have the RequiredFieldValidators hooked up and they are working if I show an * next to the field, but the style from the property setting is not.  Any suggestions?  I'm not entirely sure how the RadInputManager would know if a textbox is invalid.

    Thanks,
    David
  2. Dimo
    Admin
    Dimo avatar
    8457 posts

    Posted 04 Dec 2008 Link to this post

    Hello David,

    Normally the invalid state and CSS classes are used for date and numeric textboxes. As you suggested, RadInputManager does not take care of validating normal textboxes in any way, while the validator does not know about the InvalidCssClass. What I can suggest in this case is using some custom Javascript method, executed by the validator when the validation fails, and setting some "invalid" styles (or appending CSS classes) by this method.

    Let us know if you need further advice.

    Greetings,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top