I have a Gridview within a WinForm. I have a column of that gridview that I edit. I can click in a cell edit and hit enter to complete the editing on every cell except the one in the last row. The "enter" key does nothing when there is no row below to change to. I have tried to use the _keyPress and _keyDown events to change the "enter" key to a tab which would allow for the user to go about as normal with editing and hit enter to submit their changes.
If anyone has any input I would appreciate it.
Also Currently when i select a cell it goes into edit mode, and when the cell is no longer selected i call my endedit event and submit any changes.
I tried adding an EditingControlShowingEvent the below code was to try and assign an event to the control being edited in hopes it would call the keydown event. But it still did not.
private void dg_EditingControlSHowing(object sender,DataGridViewEditingControlShowingEventArgs e)
{
e.Control.KeyDown += new KeyEventHandler(Control_KeyDown);
}
private void Control_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyData == Keys.Enter)
{
this.ProcessTabKey(true);
}
}