Hi, I have a column that uses a multiline TextBox as the text editor. I want the user to be able to add mulitple lines of text to be stored in the model object, possibly with blank lines etc. However, the default action of finishing cell editing on the Enter key prevents that. How can I disable that default action and instead enable some other action of my choice, e.g. pressing a F8 key or the Insert key or some such? I would, of course, have to re-instate the default action before I totally finshed up editing that cell for the other columns which have regular single line text editing.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
CustomVerb1 basically means "no nothing special", which will allow the TextBox to process it.
CellEditCharacterBehaviour.Ignore might look tempting too, but that means the key press will be ignored (hence the name) and even the TextBox will not see it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I have a column that uses a multiline TextBox as the text editor. I want the user to be able to add mulitple lines of text to be stored in the model object, possibly with blank lines etc. However, the default action of finishing cell editing on the Enter key prevents that. How can I disable that default action and instead enable some other action of my choice, e.g. pressing a F8 key or the Insert key or some such? I would, of course, have to re-instate the default action before I totally finshed up editing that cell for the other columns which have regular single line text editing.
Thanks.
The behaviour of keys during editing is controlled by the
CellEditKeyEngine.To have the engine simply pass through the Enter key, do this:
CustomVerb1basically means "no nothing special", which will allow the TextBox to process it.CellEditCharacterBehaviour.Ignoremight look tempting too, but that means the key press will be ignored (hence the name) and even the TextBox will not see it.Phillip, got it. It works a treat now. Thanks very much and congrats on such a wonderful piece of software to enhance the lazy old ListView control.