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:
<
telerik:RadButton
ID
=
"RadButtonValidate"
runat
=
"server"
Text
=
"Valider"
ButtonType
=
"StandardButton"
EnableEmbeddedSkins
=
"false"
EnableEmbeddedBaseStylesheet
=
"false"
EnableBrowserButtonStyle
=
"false"
EnableTheming
=
"false"
EnableAjaxSkinRendering
=
"false"
/>
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:
ASPX:
<
telerik:RadButton
ID
=
"RadButtonValidate"
runat
=
"server"
Text
=
"Valider"
ButtonType
=
"StandardButton"
EnableBrowserButtonStyle
=
"true"
/>
Regards,
Danail Vasilev
Telerik
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">
</telerik:RadButton>
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.
Any ideas?
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:
<
script
>
function OnClientLoad(sender, args) {
sender.removeCssClass('RadButton');
}
</
script
>
<
telerik:RadButton
ID
=
"RadButton1"
OnClientLoad
=
"OnClientLoad"
>
</
telerik: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.
<
input
type
=
"submit"
value
=
"Test"
id
=
"teamPulseLogin_input"
name
=
"teamPulseLogin"
class
=
"btn"
>
If the issue is with the RadButton control could you please send us a sample code how to reproduce it.
Regards,
Joana
Telerik

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
Regards,
Danail Vasilev
Telerik