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. Image for the cookie policy date
close icon

ComboBox cell type - search by typing in textbox

Hi, I have a ComboBox cell, with ExclusiveChoiceList set to true. Let say in my ChoiceList I have 100 items that I named One, Two,..., One Hundred. Rather than scrolling through the ChoiceList to look for an item. I want to be able to type in to the textbox and then use the arrow keys to quickly move to the next or previous item (just like the Font bar item in Microsoft Word). Is it possible to do it? Cheers, YS

4 Replies

AD Administrator Syncfusion Team September 6, 2005 07:32 AM UTC

To see th ebehaviors that are possible in a cell combobox, take a look at the \Syncfusion\Essential Studio\3.3.0.0\Windows\Grid.Windows\Samples\CellTypes\ComboboxCells sample. I think the first two cell samples in each group, Editable and Autocomplete, give the behavior you described if you drop the list and start typing. The third cell sample, Exclusive, allows you just repeatedly type the first character to go to the next choice that starts with that character. Any of these cells will let you use the up/down arrow once the list is dropped.


YS Yin San Phoon September 6, 2005 07:49 AM UTC

I''ve looked at the ComboBox sample already. What I need is to be able to type a few characters, then use the arrow key to go the next or previous item (without dropping down the choicelist).


AD Administrator Syncfusion Team September 6, 2005 08:44 AM UTC

You can have the combobox auto drop as your user types by handling this event. This way he can use the arrow keys without further work on your part.
bool inStartEditing = false;
private void gridControl1_CurrentCellStartEditing(object sender, CancelEventArgs e)
{
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	if(!inStartEditing && cc.Renderer is GridComboBoxCellRenderer
		)
	{
		inStartEditing = true;
		cc.ShowDropDown();
		inStartEditing = false;
	}
}
If auto dropping the combobox does not serve your needs, then you would have to code this yourself. You could derive a custom cell control to handle this. I am not sure whether you would want to try to derive from our combobox or do something different depending upon whether you ever want dropdown support in this cell.


YS Yin San Phoon September 7, 2005 08:07 AM UTC

Hmm...that''s a bit disappointing. I thought the behaviour like the one in the Font dialog of Microsoft Word is standard and the ComboBox cell type in Syncfusion Grid should support it. I reckon it will be good if Syncfusion will support that behaviour in future.

Loader.
Live Chat Icon For mobile
Up arrow icon