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.

Combobox MaxItems property in grid

Thread ID:

Created:

Updated:

Platform:

Replies:

24390 Feb 3,2005 04:00 AM Feb 4,2005 02:40 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 3, 2005 04:00 AM

Hello, Is there a property for a comboboxcell where you can set the max items shown in the combox? Thanks

Administrator [Syncfusion]
Replied On February 3, 2005 10:07 AM

Tom, Try handling the CurrentCellShowingDropDown event private void gridControl1_CurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs e) { GridControlBase grid = sender as GridControlBase; if(grid != null) { GridCurrentCell cc = grid.CurrentCell; GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; if(cc != null) { GridComboBoxListBoxPart listBoxPart = (GridComboBoxListBoxPart)cr.ListBoxPart; listBoxPart.DropDownRows = yourMaxItemCount; } } } Stefan

Administrator [Syncfusion]
Replied On February 4, 2005 02:40 AM

Thanks!!! >Tom, > >Try handling the CurrentCellShowingDropDown event > > > private void gridControl1_CurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs e) > { > GridControlBase grid = sender as GridControlBase; > if(grid != null) > { > GridCurrentCell cc = grid.CurrentCell; > GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; > if(cc != null) > { > > GridComboBoxListBoxPart listBoxPart = (GridComboBoxListBoxPart)cr.ListBoxPart; > > listBoxPart.DropDownRows = yourMaxItemCount; > > } > } > } > > >Stefan >

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.

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.

;