Fórum

textboxlist query scroll bar

Joshua Graham, modificado 8 Anos atrás.

textboxlist query scroll bar

New Member Postagens: 8 Data de Entrada: 06/10/15 Postagens Recentes
Hi Guys,

I have a textboxlist with a long list of autocomplete items. I would like users to be able to use the autocomplete feature but also be able to browse through the complete list of possible items. I've added an "on click" handler for the textboxlist control that sends a "*" query to the control. This opens a dropdown list however only 10 items are displayed.

Is there any way to set the drop down to display all items matching the query and have the drop down scroll-able if there are too many items?
thumbnail
Nate Cavanaugh, modificado 8 Anos atrás.

RE: textboxlist query scroll bar

Junior Member Postagens: 94 Data de Entrada: 27/11/06 Postagens Recentes
Hi Joshua,
If you have a set data source, you can set the maxResultsDisplayed property to the length of your data source.

However, if it's a dynamically defined, you might need to set it to a number larger than you ever think will be possible (though this has some performance implications, depending on how high you set it, since we pre-define the list items that go into the dropdown so we don't have to keep recreating them over and over).

For the overlay, what you'll want to do is something like:

.autocomplete-results-content {
    max-height: 400px; // set this to the maximum height you wish to display
}


The .autocomplete-results-content div already has overflow-y: auto; set on it, so all you'll need to do is set a max-height.

Hope that helps emoticon
Joshua Graham, modificado 8 Anos atrás.

RE: textboxlist query scroll bar

New Member Postagens: 8 Data de Entrada: 06/10/15 Postagens Recentes
That's perfect thanks a lot