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

How to hide a button that has telerik css styles ?

2 Answers 270 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 03 Jul 2013, 02:37 PM
Hi, I have the following html button:
<input type="button" id="SubmitEnviado" runat="server" style="display: none !important" onserverclick="SubmitEnviado_Click" />


I need to hide it.

So i tried adding the following to my project's css:
a.rfdSkinnedButton, #ctl00_ContentPlaceMaster_SubmitEnviado, #ctl00$ContentPlaceMaster$SubmitEnviado, #ctl00_ContentPlaceMaster_SubmitEnviado
{
    display: none !important;
}

Its not working.
How can i hide this button ?

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Slav
Telerik team
answered on 05 Jul 2013, 10:41 AM
Hi Alexandre,

Note that the CSS selector you are using will be applied to a button element that is decorated via the RadFormDecorator control (in this case it will have a CSS class rfdSkinnedButton applied) or if it is in a content page (the id selector of the button is modified according to its position in the master page setup).

You can use the following approach to hide the button element regardless of the setup of your page:
1. Create a new CSS class that will include display: none:
.hiddenButton{
    display: none !important;
}

2. Apply the class to the button:
<input type="button" id="SubmitEnviado" runat="server" class="hiddenButton" value="Button" />

Even if there is a RadFormDecorator on the page, it will skip the button because it has a configured class attribute.

Regards,
Slav
Telerik
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 the blog feed now.
0
Alexandre
Top achievements
Rank 1
answered on 05 Jul 2013, 06:14 PM
It worked. Thanks !
Tags
General Discussions
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Slav
Telerik team
Alexandre
Top achievements
Rank 1
Share this question
or