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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Caret in ComboBox

Thread ID:

Created:

Updated:

Platform:

Replies:

32751 Aug 8,2005 06:18 AM UTC Aug 9,2005 01:11 AM UTC WinForms 3
loading
Tags: GridControl
Sue Harris
Asked On August 8, 2005 06:18 AM UTC

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 08:27 AM UTC

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 10:18 PM UTC

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 9, 2005 01:11 AM UTC

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;