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

Add a Seperator bar

5 Answers 151 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ron Boehm
Top achievements
Rank 1
Ron Boehm asked on 14 Jul 2010, 06:19 PM
Can I add a Seperator bar to a ComboBox?

5 Answers, 1 is accepted

Sort by
0
Accepted
Richard M
Top achievements
Rank 1
answered on 14 Jul 2010, 08:48 PM
You can set the IsSeperator value of an item to true

<telerik:RadComboBoxItem Value="" Text="" IsSeparator="true" />
0
Ron Boehm
Top achievements
Rank 1
answered on 15 Jul 2010, 01:53 PM
Hi,

I set the flag you suggested and I got a large gray box.

My boss wants a separator line as you would see in a menu.  How do I do this?

I tried setting the height to 2 - no effect.

0
Kalina
Telerik team
answered on 19 Jul 2010, 01:28 PM
Hello Ron Boehm,

The CSS class applied to the RadComboBox separator items is called “rcbSeparator” and you can define some custom appearance simply overriding this style:

<head runat="server">
    <title></title>
    <style type="text/css">
        .rcbSeparator
        {
            background: red !important;
            height:1px !important;
            min-height: 1px !important;
            padding:0px !important;
            margin:0px !important;           
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadComboBox ID="RadComboBox1" runat="server"
            HighlightTemplatedItems="true">
        <Items>
          <telerik:RadComboBoxItem Text="1" Value="1" />
          <telerik:RadComboBoxItem Text="" Value="" IsSeparator="true" />
          <telerik:RadComboBoxItem Text="2" Value="2" />
          <telerik:RadComboBoxItem Text="3" Value="3" />
          <telerik:RadComboBoxItem Text="4" Value="4" />
          </Items>
        </telerik:RadComboBox>
    </div>
    </form>
</body>

I hope this helps.

All the best,
Kalina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Sasireka
Top achievements
Rank 1
answered on 04 Feb 2013, 03:02 PM
Hi All,

Is any way to add seperator into rad combo box item. I need to seperate the items in the rad combo box.

Thanks
Sasireka
0
Hristo Valyavicharski
Telerik team
answered on 05 Feb 2013, 04:02 PM
Hi Sasireka,

Yes there is a separator between the items. Take a look at the Kalina and Richard posts in this thread. They explain how to add it. Here is a screenshot of how it looks like.  

Kind 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.
Tags
ComboBox
Asked by
Ron Boehm
Top achievements
Rank 1
Answers by
Richard M
Top achievements
Rank 1
Ron Boehm
Top achievements
Rank 1
Kalina
Telerik team
Sasireka
Top achievements
Rank 1
Hristo Valyavicharski
Telerik team
Share this question
or