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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Increasing the number of items in a combo box

Thread ID:

Created:

Updated:

Platform:

Replies:

67874 Sep 3,2007 05:33 PM UTC Sep 4,2007 08:59 AM UTC WinForms 2
loading
Tags: GridControl
Stephen Rose
Asked On September 3, 2007 05:33 PM UTC

Our users would like our combo box cells to show more items when they are dropped down. How would I go about doing this?

Cheers
Steve

Ajish [Syncfusion]
Replied On September 3, 2007 10:42 PM UTC

Hi Steve,

Thank you for your interest in Syncfusion product.

Please try setting the DrowDownRows property to resize the dropdown height. This can be achieved by handling the TableControlCurrentCellShowingDropDown event. In the event, the GridComboBoxCellRenderer is retrieved and DropDownRows property is to set the required. The following is the code snippet.

>>>>>
private void gridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs e)
{
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
if(cc != null)
{
if (cc.RowIndex == 4 && cc.ColIndex==1)
{
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows =1;
}
else if(cc.RowIndex == 5 && cc.ColIndex==1)
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 10;
}
}
>>>>>

Here is the link for the sample:
http://websamples.syncfusion.com/samples/Grid.Windows/F67874/main.htm

Kindly let me know if you need any further assistance.

Regards,
Ajish.

Stephen Rose
Replied On September 4, 2007 08:59 AM UTC

Thanks, That worked!

Cheers
Steve

>Hi Steve,

Thank you for your interest in Syncfusion product.

Please try setting the DrowDownRows property to resize the dropdown height. This can be achieved by handling the TableControlCurrentCellShowingDropDown event. In the event, the GridComboBoxCellRenderer is retrieved and DropDownRows property is to set the required. The following is the code snippet.

>>>>>
private void gridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs e)
{
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
if(cc != null)
{
if (cc.RowIndex == 4 && cc.ColIndex==1)
{
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows =1;
}
else if(cc.RowIndex == 5 && cc.ColIndex==1)
((GridComboBoxListBoxPart)cr.ListBoxPart).DropDownRows = 10;
}
}
>>>>>

Here is the link for the sample:
http://websamples.syncfusion.com/samples/Grid.Windows/F67874/main.htm

Kindly let me know if you need any further assistance.

Regards,
Ajish.

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.

Warning Icon 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.Close Icon

;