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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Number of Rows in Combo Box

Thread ID:

Created:

Updated:

Platform:

Replies:

59043 Apr 3,2007 08:34 PM Apr 4,2007 07:06 PM Windows Forms 2
loading
Tags: Grouping
Scott Popovic
Asked On April 3, 2007 08:34 PM

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 03:07 PM

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,
Haneef


Scott Popovic
Replied On April 4, 2007 07:06 PM

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

Scott.

CONFIRMATION

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.

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

;