This is a migrated thread and some comments may be shown as answers.

Disable CSS class from a control

3 Answers 513 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ISB-developer
Top achievements
Rank 2
ISB-developer asked on 14 Dec 2011, 04:48 PM
Is it possible to disable somehow the css class from a control?

3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 15 Dec 2011, 02:29 PM
Hello,

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,
Dobromir
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
0
ddd
Top achievements
Rank 1
answered on 05 Aug 2015, 12:54 AM

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.

0
Angel Petrov
Telerik team
answered on 10 Aug 2015, 05:46 AM
Hello,

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.

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


Regards,
Angel Petrov
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
Tags
General Discussions
Asked by
ISB-developer
Top achievements
Rank 2
Answers by
Dobromir
Telerik team
ddd
Top achievements
Rank 1
Angel Petrov
Telerik team
Share this question
or