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.

Autodropdown of ComboBox Cell

Thread ID:

Created:

Updated:

Platform:

Replies:

59080 Apr 4,2007 11:42 AM Apr 4,2007 02:14 PM Windows Forms 3
loading
Tags: GridControl
Christian Lützenkirchen
Asked On April 4, 2007 11:42 AM

Hi,

I am looking for the following behaviour of a combobox cell:
The Combobox has ExclusiveChoiceList = true; like the one in the CellControlsGrid_2005 Sample in Cell C23. When I start typing the list should open so that I can use the up and down keys to select a value. How Can I achieve this?

Regards,
Christian

haneefm [Syncfusion]
Replied On April 4, 2007 01:16 PM

Hi Christian,

You can try this.

this.grid.Model[1,1].CellType ="ComboBox";
this.grid.Model[1,1].ChoiceList = stCollection;
this.grid.Model[1,1].DropDownStyle = GridDropDownStyle.AutoComplete.

Also refer the following forum thread for autocomplete textbox in a grid.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=49800

Best regards,
Haneef

Christian Lützenkirchen
Replied On April 4, 2007 01:56 PM

Hi Haneef,

thank you for your sample. Setting DropDownStyle = GridDropDownStyle.AutoComplete does not drop down the list. The first sample has the behaviour I want, I have to add a dropdown button.

Am I right that there is no property to do this with the standard-control?

Best Regards,
Christian

haneefm [Syncfusion]
Replied On April 4, 2007 02:14 PM

Hi Christian,

One way you can do this by handling the CurrentCellKeyPress event and call the ShowDropDown method for autocomplete combobox cell in a grid. The following is the code snippet.

private void gridControl1_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
{
GridControl grid = sender as GridControl;
GridCurrentCell cc = grid.CurrentCell;
if( !cc.IsDroppedDown )
cc.ShowDropDown();
}

Best regards,
Haneef

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.

;