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. Image for the cookie policy date

Combobox MaxItems property in grid

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

2 Replies

AD Administrator Syncfusion Team February 3, 2005 03:07 PM UTC

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


AD Administrator Syncfusion Team February 4, 2005 07:40 AM UTC

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 >

Loader.
Live Chat Icon For mobile
Up arrow icon