How can I divide the items of a combo box with a dash or something similar
-
13-06-2021 - |
Question
I have a RadComboBox that wraps the items if they are longer than the width of the combo box so my combo box would show something like this:
All
White T Shirts
Black T Shirts
Blue T Shirts With
Images
Green T Shirts
So as you can see Blue T Shirts With Images wraps, which is good this what I want... But now i received a request that this althought it is what they want to see, they would like to see it separated like with a dash underline like this:
All
--------------------
White T Shirts
--------------------
Black T Shirts
--------------------
Blue T Shirts With
Images
--------------------
Green T Shirts
--------------------
So this what they would like to see or something similar, maybe even like something on the side like
* All
* White T Shirts
* Black T Shirts
* Blue T Shirts With
Images
* Green T Shirts
I am not sure how to do this and would appreciate any help as to how to do this.. Right now this is my mark up of the drop down
<telerik:RadComboBox ID="ddlTShirts" runat="server">
</telerik:RadComboBox>
Solution
try to Change the items template of the control.
<telerik:RadComboBox ID="RadComboBox1" runat="server">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chk1" Checked="true"/>
<asp:Label runat="server" ID="Label1" AssociatedControlID="chk1">
<img src='...' />
</asp:Label>
</ItemTemplate>
</telerik:RadComboBox>
Reference: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx