2 posts, 1 answers
  1. Craig
    Craig avatar
    7 posts
    Member since:
    Jun 2018

    Posted 28 Jun 2018 Link to this post

    When I disable a RadTextboxControl the "BackColor" color turns "gray" which appears to be the default color. I've been unable to find anything on how to change the default "BackColor" on the disabled control. Anytime I update the "BackColor" property via the code behind or designer itself it always goes back to the same "gray" BackColor. Thoughts?

  2. Answer
    Dimitar avatar
    2807 posts

    Posted 28 Jun 2018 Link to this post

    Hi Craig,

    Set the UseDefaultDisabledPaint of the root element to false. This way you will use the color from the theme instead of the default gray color:
    radTextBoxControl1.RootElement.UseDefaultDisabledPaint = false;

    After that you can set the disabled color in the code with the following method:
    radTextBoxControl1.TextBoxElement.SetThemeValueOverride(RadTextBoxControlElement.BackColorProperty, Color.Red, "Disabled");

    I hope this will be useful. Let me know if you have additional questions.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top