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

How Do I Display More than Six Dropdown Rows in a GridDataBoundGrid ComboBox?

I'm displaying a ComboBox in a cell of a GridDataBoundGrid. By default, the ComboBox displays only six items in the dropdown list. I'd like to display many more items, but I can't figure out how. Any suggestions?

-TC


1 Reply

JJ Jisha Joy Syncfusion Team March 17, 2011 11:05 AM UTC

Hi,

You can handle the CurrentCellShowingDropDown event and set the dropdown size as desired,

void gridDataBoundGrid1_CurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs e)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
if (cr != null)
{
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = cr.ListBoxPart.Items.Count;

}

}

Regards,
Jisha


Loader.
Live Chat Icon For mobile
Up arrow icon