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.

Caret in ComboBox

Thread ID:

Created:

Updated:

Platform:

Replies:

32751 Aug 8,2005 02:18 AM Aug 8,2005 09:11 PM Windows Forms 3
loading
Tags: GridControl
Sue Harris
Asked On August 8, 2005 02:18 AM

Is it possible to prevent a caret from appearing in a grid combo box cell without making the cell readonly/disabled. I would like to have a combo box cell (with autocomplete/exclusive style) which can change values and autocompletes as you type the entry but doesn''t show the caret. Thanks, Sue

Administrator [Syncfusion]
Replied On August 8, 2005 04:27 AM

You can try this property to see if that gives you what you want. this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.None; //or DblClickOnCell

Sue Harris
Replied On August 8, 2005 06:18 PM

Hi Clay, I''d already set that property. What I''m trying to do is to stop the caret appearing altogether, not just when the cell activates. Thanks, Sue

Administrator [Syncfusion]
Replied On August 8, 2005 09:11 PM

I do not know a simple way to do this. I think you would have to derive GridComboBoxCellRenderer/Model and override OnKeyPress in the renderer class. It is this method that handles the autocomplete work and sets the value of the cell. The added complexity is that you will have to track the position in the string at which the next keystroke will be placed in the string. In teh standard cell, this is not a problem because the portion of teh text after teh current key is always selected, so teh nect key stroke natually replaces teh selection in teh actively editing cell. In your case, there are no selsections and not actively editing cell. This also means your user gets no visible feedback of wheich key he is about to press since there is no cursor or selected text. Here is a rough try at this. http://www.syncfusion.com/Support/user/uploads/ComboBox_9f8c9974.zip

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.

;