Okay, the following should work for you when you use the DataGridView.DataSource to populate the DataGridView. I tested this out and works. Note the Timer, without the timer focus is lost when in edit more. Also note as coded the code only works the first time and only if the DataSource is not null.
public class PayneDataGridView : DataGridView
{
private bool _firstTime = true;
protected override void Select(bool directed, bool forward)
{
if (DataSource != null)
{
if (_firstTime)
{
CurrentCell = Rows[0].Cells[0];
Timer timer = new Timer();
timer.Interval = 20;
timer.Tick += (ts, te) => {
timer.Stop();
BeginEdit(false);
};
timer.Start();
_firstTime = false;
}
}
else
{
base.Select(directed, forward);
}
}
}