3 posts, 0 answers
  1. Andy
    Andy avatar
    32 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
    32 posts
    Member since:
    Nov 2010

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

  3. Eyup
    Eyup avatar
    3962 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:

    You can also check the following article:

    Hope this helps.

    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