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

How to set Maximum Dropdown Height

5 Answers 1861 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 24 Aug 2012, 04:45 AM
There is a DropDownHeight property that sets the height of the dropdownlist. How do I make this work like the MaxHeight property of the RadCombobox? It looks ridiculous with 1 entry with a large size set (eg 300px). If I allow the autocompletebox to resize the dropdownlist by itself, then its fine with a few records, but it scrolls off the page when many records match the filter.

5 Answers, 1 is accepted

Sort by
0
Accepted
Ivana
Telerik team
answered on 24 Aug 2012, 01:47 PM
Hi Jeremy,

The following CSS will set a max height to the drop-down list of RadAutoCompleteBox:
.RadAutoCompleteBoxPopup_Default, .RadAutoCompleteBoxPopup .racList {
     max-height: 100px !important;
}
(_Default is for the Skin being used by the control.)

I hope this will help.

Kind regards,
Ivana
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.
0
Jeremy
Top achievements
Rank 1
answered on 27 Aug 2012, 12:45 AM
That works fantastically, Thanks!
0
Ciupaz
Top achievements
Rank 2
Veteran
answered on 24 Jun 2020, 06:25 PM

And how can I prevent that the list overlaps below controls, like in the figure? 

 

0
Peter Milchev
Telerik team
answered on 29 Jun 2020, 09:08 AM

Hi,

The element that contains the tokens can be styled using the following CSS:

<style>
    div.RadAutoCompleteBox div.racTokenList{
        max-height:100px;
        overflow-y:auto
    }
</style>

Regards,
Peter Milchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Ciupaz
Top achievements
Rank 2
Veteran
answered on 29 Jun 2020, 01:28 PM

I have in this way, and seem good: 

 

<style type="text/css">
    .RadAutoCompleteBoxPopup_Default, .RadAutoCompleteBoxPopup .racList .racTokenList{
      max-height: 180px !important;
      overflow-y: auto;
    }
  </style>
Tags
AutoCompleteBox
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Jeremy
Top achievements
Rank 1
Ciupaz
Top achievements
Rank 2
Veteran
Peter Milchev
Telerik team
Share this question
or