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

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


SH Sue Harris 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


AD Administrator Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon