Number of Rows in Combo Box

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.

2 Replies

HA haneefm Syncfusion Team 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,
Haneef



SP Scott Popovic 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

Scott.

Loader.
Up arrow icon