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

Caret in ComboBox

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

3 Replies

AD Administrator Syncfusion Team August 8, 2005 03:27 AM

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


SH Sue Harris August 8, 2005 05: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


AD Administrator Syncfusion Team August 8, 2005 08: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

Loader.
Live Chat Icon For mobile
Up arrow icon