Wired_Nerve
Top achievements
Rank 2
Wired_Nerve
asked on 28 Feb 2013, 09:49 PM
I have tried to create a Horizontal Rule <hr /> separator and it outputs the text <hr /> or <hr> instead of a HR line -------------------
I figure this has to do with encoding and etc.. Suggestions on how to do this?
RadComboBoxItem seperator = new RadComboBoxItem("<hr />", "<hr />") { IsSeparator = true };
I figure this has to do with encoding and etc.. Suggestions on how to do this?
4 Answers, 1 is accepted
0
Hi Warren,
You cannot use horizontal line by adding it as a text of RadComboBox item. There are two ways you can put it as a separator between the items:
Greetings,
Hristo Valyavicharski
the Telerik team
You cannot use horizontal line by adding it as a text of RadComboBox item. There are two ways you can put it as a separator between the items:
- Using templates and putting <hr/> inside ItemTemplate. This approach will put horizontal line for all items.
- Using IsSeparator property and change css of the default separator:
<style type=
"text/css"
>
.rcbSeparator {
border-style
:
solid
;
border-bottom
:
thick
dotted
#ff0000
;
}
</style>
Greetings,
Hristo Valyavicharski
the Telerik team
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 their blog feed now.
0
Wired_Nerve
Top achievements
Rank 2
answered on 05 Mar 2013, 04:59 PM
We don't need it after each line...
We have a primary item at the top of the list... Then a list of other items...
For example:
Please select your Site: [ dropdown ]
My default site
------------------------
Site 2
Site 3
Site 4
Site 5
We have a primary item at the top of the list... Then a list of other items...
For example:
Please select your Site: [ dropdown ]
My default site
------------------------
Site 2
Site 3
Site 4
Site 5
1
Accepted
Hi Warren,
The easiest way to achieve this look is to apply css to the desired item:
Regards,
Hristo Valyavicharski
the Telerik team
The easiest way to achieve this look is to apply css to the desired item:
<style type=
"text/css"
>
.separator {
border-bottom
:
solid
#ff0000
;
}
</style>
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
=
"server"
Label
=
"Site:"
>
<
Items
>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"My default site"
Value
=
"1"
CssClass
=
"separator"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Site 2"
Value
=
"2"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Site 3"
Value
=
"3"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Site 4"
Value
=
"4"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Site 5"
Value
=
"5"
/>
</
Items
>
</
telerik:RadComboBox
>
Regards,
Hristo Valyavicharski
the Telerik team
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 their blog feed now.
Johnny
commented on 05 Dec 2022, 11:49 AM
| edited
Top achievements
Rank 3
Bronze
Iron
Iron
Tested and still works as desired in 2022.
Rumen
commented on 05 Dec 2022, 11:33 PM
Telerik team
Thank you for confirming it, Johny!
0
Wired_Nerve
Top achievements
Rank 2
answered on 07 Mar 2013, 01:57 PM
Wow, that is like stupid obvious! D'oh...