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

ComboBox item list too tall

3 Answers 69 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 2
John asked on 20 May 2014, 07:41 PM
I have a ComboBox with a over 100 items in it. I expect that when the dropdown list appears, it would expand to show as many items as possible, given the browser's viewport, then show a scroll bar within the dropdownlist to allow selection of additional items. Instead the ComboBox's dropdown list expands up to the height of the entire page, meaning the user must scroll the entire page to see the list. Is there a way to configure the RadComboBox to function as desired?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 May 2014, 07:02 AM
Hi John,

By default RadComboBox behavior is that it will show as many items as possible, based on the browser's viewport. For showing the remaining items one scroll bar will appear inside the dropdownlist of RadComboBox. Please have a look into the sample code snippet which works fine at my end and also take a look into the attached screen shot.

ASPX:
<telerik:RadComboBox ID="radcboScroll" runat="server">
</telerik:RadComboBox>

C#:
protected void Page_Load(object sender, EventArgs e)
{
    for (int index = 0; index < 150; index++)
    {
        Telerik.Web.UI.RadComboBoxItem item = new Telerik.Web.UI.RadComboBoxItem();
        item.Text = index.ToString();
        radcboScroll.Items.Add(item);
    }
}

Let me know if you have any concern.
Thanks,
Princy.
0
John
Top achievements
Rank 2
answered on 21 May 2014, 12:32 PM
Hi Princy,

Yes, what you described is what I expect as well, but it is not what I am experiencing. When the dropdown is expanded, it extends beyond the screen (that is, outside the viewport), causing the entire page to be scrolled up or down to view to make a selection. (see attachment)
0
Princy
Top achievements
Rank 2
answered on 22 May 2014, 04:23 AM
Hi John,

The provided information is not enough to replicate the issue. Please provide a sample code where I can reproduce the issue for further help.

Thanks,
Princy.
Tags
ComboBox
Asked by
John
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
John
Top achievements
Rank 2
Share this question
or