Automatically Show Dropdown For Autocomplete

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.


3 Replies

HA haneefm Syncfusion Team May 30, 2007 08:57 PM UTC

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


TG Tod Golding May 30, 2007 10:13 PM UTC

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


HA haneefm Syncfusion Team May 30, 2007 11:13 PM UTC

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

Loader.
Up arrow icon