SourceGrid.GridVirtual.OnEnter C# (CSharp) Method

OnEnter() protected method

protected OnEnter ( EventArgs e ) : void
e System.EventArgs
return void
        protected override void OnEnter(EventArgs e)
        {
            base.OnEnter(e);

            //Move the focus on the first cell if there isn't an active cell and the FocusStyle FocusFirstCellOnEnter is on.
            if ((Selection.FocusStyle & FocusStyle.FocusFirstCellOnEnter) == FocusStyle.FocusFirstCellOnEnter &&
                Selection.ActivePosition.IsEmpty())
            {
                Selection.FocusFirstCell(false);
            }
        }