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.

number of lines in ComboBox

Thread ID:

Created:

Updated:

Platform:

Replies:

77018 Oct 7,2008 02:11 PM Oct 10,2008 02:26 AM Windows Forms 1
loading
Tags: GridControl
Frederic Dubois
Asked On October 7, 2008 02:11 PM

Hi
I've tried to change the number of line of a combo box in a GridControl. But I never found a properties to change that. How can I change the number of row displayed, because only 6 rows is really not enough.


Jisha Joy [Syncfusion]
Replied On October 10, 2008 02:26 AM

Hi Fredric,

This can be achieved by setting the DropDownRows property of the GridComboBoxListBoxPart to a specified value in the CurrentCellShowingDropDown event.

Please refer the code:


void gridControl1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
{
GridCurrentCell cc = this.gridControl1.CurrentCell;
if (cc.Renderer is GridComboBoxCellRenderer)
{
GridComboBoxCellRenderer dr = cc.Renderer as GridComboBoxCellRenderer;
((GridComboBoxListBoxPart)dr.ListBoxPart).DropDownRows = 12;
}

}



Please let me know if this helps.

Regards,
Jisha


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.

;