If an object such as a button has an existing cssclass defined, will RadFormDecorator override the definition? Is there a way to force it to override any existing definition? Also, are LinkButtons covered?
3 Answers, 1 is accepted
0
Martin
Telerik team
answered on 14 Dec 2009, 07:45 AM
Hi jack mira,
The logic of RadFormDecorator is to skip elements that have a defined CSS class and at present there is no way to force style such elements. As per your question about <asp:LinkButton /> - the control does not decorate such elements, because the server output of a LinkButton is a <a /> element, and links are not in the scope RadFormDecorator, because it operates on form controls only.
I have stumbled out of a dark room to find this post. Sorry for the flashback. I tried adding a form decorator to the top of every ascx object in a multi-tab page form. It definitely did its thing. However, what it did was to render the form ignoring all my css, until, the page was loaded. So for example, the panel background defaulted to white with the RadFormDecorator. If I went to a different tab and then came back to the one that RadFormDecorator screwed up, the form looked fine. Do you have any clue why this might have been happening? It appears that it was changing div elements that I had already 'styled' with css.
0
Vessy
Telerik team
answered on 08 Sep 2020, 03:16 PM
Hi Allen,
This behavior can be observed if the selectors setting your custom styles are too light (e.g., using only one class name). You can change that by making the selectors heavier than the RadFormdecorators one's. You can find useful information about the CSS specificity here:
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).