SourceGrid.Selection.SelectionBase.FocusFirstCell C# (CSharp) Метод

FocusFirstCell() публичный Метод

Set the focus on the first available cells starting from the not fixed cells. If there is an active selection set the focus on the first selected cells.
public FocusFirstCell ( bool pResetSelection ) : bool
pResetSelection bool
Результат bool
        public virtual bool FocusFirstCell(bool pResetSelection)
        {
            Position focusPos;

            PositionCollection selectedPos = GetSelectionRegion().GetCellsPositions();
            //Check if there is a valid selection
            focusPos = SearchForValidFocusPosition(selectedPos);
            if (focusPos.IsEmpty())
                focusPos = SearchForValidFocusPosition();

            if (focusPos.IsEmpty() == false)
                return Focus(focusPos, pResetSelection);
            else
                return false;
        }