This is a migrated thread and some comments may be shown as answers.

RadInputManager and InvalidCssClass

1 Answer 67 Views
Input
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 2
David asked on 03 Dec 2008, 10:16 PM
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

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 04 Dec 2008, 09:24 AM
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.
Tags
Input
Asked by
David
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or