Item grouping

2 posts, 0 answers
  1. Antony
    Antony avatar
    32 posts
    Member since:
    Feb 2013

    Posted 24 Oct 2013 Link to this post

    Does combobox support item grouping? I want a tree like structure to be created inside the combobox without using the item template.
    A sample
    Smartphone
      Apple
      Motorola
    Laptop
      MacBook
      HP

    like this.
     
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Oct 2013 Link to this post

    Hi Antony,

    Please have a look into the following code snippet I tried.

    ASPX:
    <telerik:RadComboBox ID="RadComboBox1" runat="server" EmptyMessage="select">
        <Items>
            <telerik:RadComboBoxItem Text="SmartPhone" runat="server" />
            <telerik:RadComboBoxItem Text="Apple" runat="server" CssClass="SubItem"/>
            <telerik:RadComboBoxItem Text="Motorola" runat="server" CssClass="SubItem" />
            <telerik:RadComboBoxItem Text="LapTop" runat="server"/>
            <telerik:RadComboBoxItem Text="Mac Book" runat="server" CssClass="SubItem" />
            <telerik:RadComboBoxItem Text="HP" runat="server" CssClass="SubItem" />
        </Items>
    </telerik:RadComboBox>

    CSS:
    <style>
        .SubItem
        {
           margin-left: 10px !important;
        }
    </style>

    Thanks,
    Shinu.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top