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

Set MaxDropDownItems for Combobox in Grid

Thread ID:





95416 Jul 7,2010 07:59 AM UTC Jul 9,2010 10:33 AM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Sven Knebel
Asked On July 7, 2010 07:59 AM UTC


I am using the following code to display a combox in a grid:

cellStyle.CellType = GridCellTypeName.ComboBox;
cellStyle.ChoiceList = new System.Collections.Specialized.StringCollection();

where cellStyle is of type GridStyleInfo.

How can I set the property MaxDropDownItems of the combobox, so that no scrollbars are display. Currently it seems to be set to 5.


Jisha Joy [Syncfusion]
Replied On July 9, 2010 10:33 AM UTC

Hi Knebel,

Thank you for using Syncfusion products.

The number of items to be displayed in dropdownpart while combobox is dropped down, can be set through the DropDownRows property of ListBoxPart in the GridComboBoxCellRenderer class.

Refer the code below:

GridComboBoxCellRenderer rend = this.gridControl1.Model.CellRenderers["ComboBox"] as GridComboBoxCellRenderer;
GridComboBoxListBoxPart lbpart = rend.ListBoxPart as GridComboBoxListBoxPart;
lbpart.DropDownRows = 10;

This code gets the renderer object of the combobox cells in grid and assigns the dropdownrows count to 10. Now, on dropping down the combobox, 10 items can be viewed at a time without a need to scroll.



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