What I was thinking was to make a custom columntype, and indeed, I created it, I have to override OnKeyPress event.
So, I was doing the following:
Expand|Select|Wrap|Line Numbers
- public class MyCustomControl : System.Windows.Forms.DataGridViewTextBoxEditingControl
- {
- protected override void OnKeyPress(KeyPressEventArgs e)
- {
- if (e.KeyChar == ',')
- {
- base.OnKeyPress(e); //Ok
- }
- else
- {
- e.Handled = true; //Deny
- }
- }
- }
- public class TextBoxWithoutComma : System.Windows.Forms.DataGridViewTextBoxColumn
- {
- //I dunno what to put here to use my current control
- }