How to increase the `DropDownHeight` of `RadComboBox` that contains `Templates`

1.6k views Asked by At

I have a RadComboBox as below :-

<telerik:RadComboBox ID="RadComboBoxNames" runat="server" Width="470px" DropDownAutoWidth="Enabled" MaxHeight="363px" Skin="MySkin" EmptyMessage="Select"
                HighlightTemplatedItems="True" DataValueField="ID" DataTextField="ID" OnDataBound="RadComboBoxNames_DataBound" >
                <HeaderTemplate>
                    <table style="width: 250px; text-align: left">
                        <tr>
                            <td style="font-weight: bold; width: 60px;">ID</td>
                            <td style="font-weight: bold; width: 180px;">Name</td>
                        </tr>
                    </table>
                </HeaderTemplate>
                <ItemTemplate>
                    <table style="width: 250px; text-align: left">
                        <tr>
                            <td style="width: 60px;"><%#DataBinder.Eval(Container.DataItem, "ID")%></td>
                            <td style="width: 180px;"><%#DataBinder.Eval(Container.DataItem, "Name")%></td>
                        </tr>
                    </table>
                </ItemTemplate>
            </telerik:RadComboBox>

Now my DropDown height is not 363px as I have set in the MaxHeight property, it is very small and not increasing my dropdown height even if I Increase the value in MaxHeight property !!

How to increase my DropDownHeight of my RadComboBox ? Do I have to use any styling techniques ? Please Help, ThankYou.

2

There are 2 answers

0
James Randy On

Just keep the Height property of the RadComboBox !!

3
Minh Bui On

You can alternatively change the MaxWidth of the RadComboBox drop down area by editing the default theme of RadComboBox. To do that, follow these steps:

  1. Open your project in Blend and with RadComboBox selected go to Object-> Edit Template -> Edit a Copy
  2. Search for a Control Template with an x:Key="NonEditableComboBox"
  3. Inside, find Popup x:Name="PART_Popup"
  4. Add a MaxWidth property that equals a value which you see fit to your needs.

Hope it would help.