Winforms DataGridView custom edit control/cell
问题 I'm creating a custom editing control for my DataGridView in my winforms application, and I'd like to raise an event when the user hits the enter key, but before the datagridview scrolls to the next row. I don't really care if the event is raised by the cell, or the editing control as I can propagate the event as needed. So far I've tried to override both the OnKeyDown and OnKeyUp methods of the DataGridViewTextBoxCell class which I'm inheriting from and neither of these methods seems to be