Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
800
Simple Styling
posted

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

Parents
No Data
Reply
  • 24497
    Verified Answer
    posted

    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>

Children