I'm trying to remove styles on RadButton as said in this topic: http://www.telerik.com/forums/remove-styles-radlinkbutton
However, this doesn't work at all, I keep getting default style on IE 8 or Firefox (by removing class with firebug or IE dev toolbar, I get the good result).
Here is my code:
I use Telerik ASP.NET version 2014.1.225.45.
Can you help me ?
6 Answers, 1 is accepted
You can simply set the EnableBrowserButtonStyle property to true. For example:
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Thanks, it works perfectly !
Doesn't work for me at all :(
I am using the latest version of Telerik for ASP.Net AJAX
<telerik:RadButton ID="teamPulseLogin" runat="server" ButtonType="StandardButton" EnableAjaxSkinRendering="false" EnableTheming="false" EnableBrowserButtonStyle="true" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" CssClass="btn btn-info" OnClick="teamPulseLogin_Click">
I cleared the browser cache but still I see the Telerik css classes assigned when ispecting the element. Also the styles are applied and my own are not.
The EnableBrowserButtonStyle apply the default browser styling to the RadButton. However, the control is rendered with particular classes which are not removed by setting the EnableBrowserStyle property.
You could remove the CssClasses manually OnClientLoad of the RadButton:
Another option is to create a custom skin, following the approach from the Creating a Custom Skin for RadButton article and override the styles of the base and skin specific stylesheets.
There is no reason for not applying your custom styles. You could test whether your styles are applied to a HTML element.
If the issue is with the RadButton control could you please send us a sample code how to reproduce it.
Thanks. Yes there is no reason to not apply my own css classes and that is exactly what I wanted to do :)
The problem is that the RadButton styles are overwriting my styles...
I think removing the css class the js way is always just a workaround. I would appreciate to control this by a property instead of letting the css class being applied and then removing it.
Can you send me a runnable sample that reproduces the issue with the styles not applied, so that I can investigate it further?
As for the classes removal feature you can use our feedback portal in order to log your ideas about the control http://feedback.telerik.com/Project/108