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;
        }