Hi, I have RadDecorator on my page but I want to exclude only couple of TextBoxes and couple of Labels where I want to apply my own CSS.
Now, I already applied CSSClass to my textbox but its not applying as I have formDecorator on my page as above.
So How do I exclude specific controls from FormDecorator to apply my own CSS?
Thanks in advance
<telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all"
Skin="WebBlue"></telerik:RadFormDecorator>
Now, I already applied CSSClass to my textbox but its not applying as I have formDecorator on my page as above.
So How do I exclude specific controls from FormDecorator to apply my own CSS?
Thanks in advance
5 Answers, 1 is accepted
0
Hi Nirav,
Hi if you want to exclude some specific elements no to be decorated by RadFromDecorator, you could put which controls to be decorated using DecoratedControls property:
In that specific scenario only Checkboxes and Buttons will be decoarated, while the radio button on the page will not be decorated and you will be able to style it using your own classes and CSS.
Another option is to leave the property DecoratedControls set to All and to use ControlToSkip property to specify, which controls should not be decorated:
In that scenario only checkboxes will not be decorated and you will be able to style on you own choice.
Greetings,
Bojo
the Telerik team
Hi if you want to exclude some specific elements no to be decorated by RadFromDecorator, you could put which controls to be decorated using DecoratedControls property:
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
style
type
=
"text/css"
>
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
asp:ScriptManager
>
<
telerik:RadFormDecorator
ID
=
"RadFormDecorator1"
runat
=
"server"
DecoratedControls
=
"CheckBoxes, Buttons"
Skin
=
"Forest"
/>
<
asp:Button
ID
=
"btn1"
runat
=
"server"
Text
=
"Add New Event"
/><
br
/>
<
input
type
=
"checkbox"
/>Checkbox<
br
/>
<
input
type
=
"radio"
/>Radio
</
form
>
</
body
>
</
html
>
In that specific scenario only Checkboxes and Buttons will be decoarated, while the radio button on the page will not be decorated and you will be able to style it using your own classes and CSS.
Another option is to leave the property DecoratedControls set to All and to use ControlToSkip property to specify, which controls should not be decorated:
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
style
type
=
"text/css"
>
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
asp:ScriptManager
>
<
telerik:RadFormDecorator
ID
=
"RadFormDecorator1"
runat
=
"server"
DecoratedControls
=
"All"
ControlsToSkip
=
"CheckBoxes"
Skin
=
"Forest"
/>
<
asp:Button
ID
=
"btn1"
runat
=
"server"
Text
=
"Add New Event"
/><
br
/>
<
input
type
=
"checkbox"
/>Checkbox<
br
/>
<
input
type
=
"radio"
/>Radio
</
form
>
</
body
>
</
html
>
In that scenario only checkboxes will not be decorated and you will be able to style on you own choice.
Greetings,
Bojo
the Telerik team
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
0

Chris Griffin
Top achievements
Rank 1
answered on 20 Jan 2011, 05:15 PM
I think the OP meant specific controls (i.e. cmdSubmit) not a certain type. I have ran into this situation.
0

Nirav
Top achievements
Rank 1
answered on 21 Jan 2011, 03:20 PM
Thanks a lot Admin.
Actually like I said, I am looking to exclude specific controls only, I mean not all the textboxes, only couple of textboxes on my form.
Is it possible to exclude by giving that controlID ( textboxid or dropdownid).
I want to exclude couple of textboxes of my screen, not all. For those textboxes, I need to apply my own CSS.
so is there any way to exclude controls by giving ControlID ?
Thanks again
Actually like I said, I am looking to exclude specific controls only, I mean not all the textboxes, only couple of textboxes on my form.
Is it possible to exclude by giving that controlID ( textboxid or dropdownid).
I want to exclude couple of textboxes of my screen, not all. For those textboxes, I need to apply my own CSS.
so is there any way to exclude controls by giving ControlID ?
Thanks again
0
Hi Nirav,
No, RadFormDecorator does not accepts specific IDs for decoration (or skipping one). What you could do is to wrap the rest of the controls (that you wish to decorate) in some container (DIV / SPAN) and set its ID as DecorationZone. RadFormDecorator will style the controls in the decoration zone only.
Regards,
Georgi Tunev
the Telerik team
No, RadFormDecorator does not accepts specific IDs for decoration (or skipping one). What you could do is to wrap the rest of the controls (that you wish to decorate) in some container (DIV / SPAN) and set its ID as DecorationZone. RadFormDecorator will style the controls in the decoration zone only.
Regards,
Georgi Tunev
the Telerik team
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
0

Emanuele
Top achievements
Rank 2
answered on 02 May 2011, 06:16 PM
If you set CssClass for a control, radFormDecorator skip it from rendering process.
ie
ie
<
asp:Button
ID
=
"LoginButton"
runat
=
"server"
CssClass
=
"pippo"
/>