I'm trying to alter the default styling for the numeric and currency editors. I would like to set the background color on focus and restore the background color after the focus is lost. I've tried setting CssClass and FocusCssClass in the markup with my class and they have no effect. I am able to use client events to set and restore the background color on client events but I would rather use the css that's "built-in". I'm using 2011.2
Please advise.
Thanks,
Steve
Hi Steve,
I tried following and it worked.
<style type="text/css">.focusCss{background:red;}</style> <ig:WebNumericEditor ID="WebNumericEditor1" runat="server" FocusCssClass="focusCss"></ig:WebNumericEditor> <ig:WebNumericEditor ID="WebNumericEditor2" runat="server" FocusCssClass="focusCss"> <Buttons SpinButtonsDisplay="OnRight"></Buttons> </ig:WebNumericEditor>
If your application sets both CssClass and FocusCssClass, then in order for FocusCssClass to have effect, the definition(order) of FocusCssClass within style object should be located after definition of CssClass. Example:
<style type="text/css"> .noFocusCss{background:blue;} .focusCss{background:red;}</style><ig:WebNumericEditor ID="WebNumericEditor1" runat="server" CssClass="noFocusCss" FocusCssClass="focusCss"></ig:WebNumericEditor>
Thanks for the reply. That works for me too when I changed the ordering of the CSS in the stylesheet. I'm not sure why that is so. Definitely not documented anywhere that I saw.