RadNumericTextBox

3 posts, 0 answers
  1. Andy
    Andy avatar
    27 posts
    Member since:
    Nov 2010

    Posted 17 Nov 2015 Link to this post

    I need to change the background color of the text box based on the value the user enters.  For instance if the value is less than 10 then I want the background to be blue, if it greater than 20 I want it to be red.  Between 10 and 20 the background should remain white.  I have tried changing the style.background property in the onBlur client event, but have not had any success.  Any help would be appriciated.

     

  2. Andy
    Andy avatar
    27 posts
    Member since:
    Nov 2010

    Posted 18 Nov 2015 in reply to Andy Link to this post

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 20 Nov 2015 Link to this post

    Hello Andy,

    If you want to achieve this requirement dynamically using script, you can make avail of the updateCssClass
    method as demonstrated in this section:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/numerictextbox/client-side-programming/overview#changing-the-appearance-style-of-radinput-controls-on-the-client

    You can also check the following article:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/numerictextbox/appearance-and-styling/styles

    Hope this helps.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top