We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Number of Rows in Combo Box

Thread ID:





59043 Apr 4,2007 12:34 AM UTC Apr 4,2007 11:06 PM UTC WinForms 2
Tags: Grouping
Scott Popovic
Asked On April 4, 2007 12:34 AM UTC

How do I alter the default number of rows displayed in a combo box? THere does not seem to be a property and I have very long lists. The default of 6 rows is not enough for these lists.

Any help would be appreciated.

haneefm [Syncfusion]
Replied On April 4, 2007 07:07 PM UTC

Hi Scott,

The height of the dropdown is determined through the DropDownRows property as discussed in this KB. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=288

Best regards,

Scott Popovic
Replied On April 4, 2007 11:06 PM UTC

Thanks Haneef. I tried this code, but it did not work. I suspect it maybe because I am using the Grid Grouping control and for some reason GridControlBase is always null.

I did manage to get it working by using this code:

private void gridGroupingControl_TableControlCurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs e)
GridCurrentCell cc =e.TableControl.GetNestedCurrentCell();
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;

if(cc != null && cr != null)
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 20;

Thanks for your help



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon