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.
Up arrow icon