You can set this on a grid-wide basis with code such as;
GridDropDownGridListControlCellRenderer cr = (GridDropDownGridListControlCellRenderer)
this.grid.CellRenderers["GridListControl"];
(( GridDropDownGridListControlPart) cr.ListControlPart).DropDownRows = 2; // 2 rows in the dropdown
If you need to do it on a column by column basis (or cell by cell), then you will have to handle the CurrentCellShowingDropDown event.
private void gridControl1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
{
GridControlBase grid = sender as GridControlBase;
if(grid != null)
{
GridCurrentCell cc = grid.CurrentCell;
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
if(cc != null)
{
if(cc.ColIndex == 6)
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 4;
else if(cc.ColIndex == 4)
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 7;
else if(cc.ColIndex == 2)
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 10;
else
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 6;
}
}
}