Disable CSS class from a control

4 posts, 0 answers
  1. ISB-developer
    ISB-developer avatar
    21 posts
    Member since:
    Jul 2011

    Posted 14 Dec 2011 Link to this post

    Is it possible to disable somehow the css class from a control?
  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 15 Dec 2011 Link to this post


    None of RadControls for ASP.NET AJAX offer built-in functionality to remove (disable) a CSS class from the rendered HTML elements. And also, such action is highly not recommended because the appearance of the control and various functionality depend on these CSS classes.

    Could you please provide more detailed information why exactly do you need to remove a CSS class from the control so we can try to provide alternative solution?

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. ddd
    ddd avatar
    1 posts
    Member since:
    Aug 2015

    Posted 04 Aug 2015 Link to this post

    I want apply bootstrap css classes instead. Example is RadTextBox

    So I go CssClass = "form-control"; But he only appends form-control, so ends up with "riTextBox riEnabled form-control" and not just "form-control".

    And then Telerik overwrites some bootstrap css.

  4. Angel Petrov
    Angel Petrov avatar
    1044 posts

    Posted 10 Aug 2015 Link to this post


    You can disable the built-in skins by setting the EnableEmbeddedSkins and EnableEmbeddedBaseStylesheet properties of the control to false. That way the classes will be rendered to the element but will not apply any styling and you should be able to apply your class.

    <telerik:RadTextBox runat="server" id="test1" CssClass="textBox" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false"></telerik:RadTextBox>

    Angel Petrov
    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