The events are fired in the following order: UserAddingRow, EditorRequired, UserAddedRow eventfired when the new is pinned at the bottom and TAB key is processed.
Workaround:
public class FixGridNewRowBehavior : GridNewRowBehavior
{
protected override bool ProcessTabKey(System.Windows.Forms.KeyEventArgs keys)
{
bool isInEditMode = this.EditorManager.IsInEditMode;
if (isInEditMode)
{
IGridNavigator navigator = GridViewElement.Navigator;
bool isLeftNavigation = navigator.IsFirstColumn(GridViewElement.CurrentColumn) && keys.Shift;
bool isRightNavigation = navigator.IsLastColumn(GridViewElement.CurrentColumn) && !keys.Shift;
if (isLeftNavigation || isRightNavigation)
{
this.GridViewElement.EndEdit();
}
if (isLeftNavigation)
{
navigator.SelectLastColumn();
}
else if (isRightNavigation)
{
navigator.SelectFirstColumn();
}
if (isLeftNavigation || isRightNavigation)
{
GridViewElement.BeginEdit();
return true;
}
}
return base.ProcessTabKey(keys);
}
}
BaseGridBehavior gridBehavior = this.radGridView1.GridBehavior as BaseGridBehavior;
gridBehavior.UnregisterBehavior(typeof(GridViewNewRowInfo));
gridBehavior.RegisterBehavior(typeof(GridViewNewRowInfo), new FixGridNewRowBehavior());