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.

ComboBox cell type - search by typing in textbox

Thread ID:

Created:

Updated:

Platform:

Replies:

34179 Sep 5,2005 11:49 PM Sep 7,2005 04:07 AM Windows Forms 4
loading
Tags: GridControl
Yin San Phoon
Asked On September 5, 2005 11:49 PM

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

Administrator [Syncfusion]
Replied On September 6, 2005 03:32 AM

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.

Yin San Phoon
Replied On September 6, 2005 03:49 AM

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).

Administrator [Syncfusion]
Replied On September 6, 2005 04:44 AM

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.

Yin San Phoon
Replied On September 7, 2005 04:07 AM

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.

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.

;