Add a Seperator bar

6 posts, 1 answers
  1. Ron Boehm
    Ron Boehm avatar
    19 posts
    Member since:
    Dec 2009

    Posted 14 Jul 2010 Link to this post

    Can I add a Seperator bar to a ComboBox?
  2. Answer
    Richard M
    Richard M avatar
    15 posts
    Member since:
    Feb 2010

    Posted 14 Jul 2010 Link to this post

    You can set the IsSeperator value of an item to true

    <telerik:RadComboBoxItem Value="" Text="" IsSeparator="true" />
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ron Boehm
    Ron Boehm avatar
    19 posts
    Member since:
    Dec 2009

    Posted 15 Jul 2010 Link to this post

    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.

  5. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 19 Jul 2010 Link to this post

    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
  6. Sasireka
    Sasireka avatar
    17 posts
    Member since:
    Nov 2012

    Posted 04 Feb 2013 Link to this post

    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
  7. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 05 Feb 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017