Forums de discussion

textboxlist query scroll bar

Joshua Graham, modifié il y a 8 années.

textboxlist query scroll bar

New Member Publications: 8 Date d'inscription: 06/10/15 Publications récentes
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, modifié il y a 8 années.

RE: textboxlist query scroll bar

Junior Member Publications: 94 Date d'inscription: 27/11/06 Publications récentes
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, modifié il y a 8 années.

RE: textboxlist query scroll bar

New Member Publications: 8 Date d'inscription: 06/10/15 Publications récentes
That's perfect thanks a lot