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

How to control the number of visible items in a ComboBox cell?

In order to control the items showing in dropdown of combo box, GridComboBoxListBoxPart.DropDownRows property can be used. The GridComboBoxListBoxPart is the actual control type of the list that is dropped to display the items. But, it is buried a little deep and generally needs an event handler to set it.

The reason for using an event handler is that normally a single ComboBox control is shared among all ComboBox cells. Each cell can potentially have a different list and may need different numbers of visible rows. So to handle this, you must catch Grid.CurrentCellShowingDropDown event and set the property there depending upon the exact row and column.

Code Snippet

C#

 

VB

 

Screenshot

Sample Link

C#: DropDownRows_ComboBox_CS

VB: DropDownRows_ComboBox_VB

 

Article ID: Published Date: Last Revised Date: Platform: Control:
5949 01/03/2016 01/03/2016 Windows Forms GridControl
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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