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.

Automatically Show Dropdown For Autocomplete

Thread ID:

Created:

Updated:

Platform:

Replies:

61680 May 30,2007 04:04 PM May 30,2007 07:13 PM Windows Forms 3
loading
Tags: GridControl
Tod Golding
Asked On May 30, 2007 04:04 PM

I am using an "autocomplete" combo box as a cell for my grid. Is there any way to have the dropdown automatically appear as I begin to type and move to the selection bar to the nearest match as I type?

Basically, I'm looking for "google-like" intellisense.


haneefm [Syncfusion]
Replied On May 30, 2007 04:57 PM

Hi Tod,

You can handle the TableControlCurrentCellChanged event and call CurrentCell.ShowDropDown method to show the dropdown in a gridcell. Here is a code snippet

private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlEventArgs e)
{
if( e.TableControl.CurrentCell.Renderer is GridComboBoxCellRenderer
&& e.TableControl.CurrentCell.IsDroppedDown )
e.TableControl.CurrentCell.ShowDropDown();
}

Best regards,
Haneef

Tod Golding
Replied On May 30, 2007 06:13 PM

Cool. Thanks. This mostly works. However, if I try to arrow through the items in the dropdown (after it has been shown), this conflicts with this solution (since the arrow is also seen as a keypress in the cell). Any quick workaround for that problem?

>Hi Tod,

You can handle the TableControlCurrentCellChanged event and call CurrentCell.ShowDropDown method to show the dropdown in a gridcell. Here is a code snippet

private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlEventArgs e)
{
if( e.TableControl.CurrentCell.Renderer is GridComboBoxCellRenderer
&& e.TableControl.CurrentCell.IsDroppedDown )
e.TableControl.CurrentCell.ShowDropDown();
}

Best regards,
Haneef

haneefm [Syncfusion]
Replied On May 30, 2007 07:13 PM

Hi Tod,

Please handle the TableControlCurrentKeyPress/TableControlCurrentKeyDown event and call CurrentCell.ShowDropDown method to show the dropdown in a gridcell. Let me know if this helps.

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.

;