SourceGrid.GridVirtual.PositionAtPoint C# (CSharp) Method

PositionAtPoint() public method

Returns the cell at the specified grid view relative point (the point must be relative to the grid display region), SearchInFixedCells = true. Return Position.Empty if no valid cells are found.
public PositionAtPoint ( Point point ) : Position
point Point Point relative to the DisplayRectangle area.
return Position
        public virtual Position PositionAtPoint(Point point)
        {
            int? row = Rows.RowAtPoint(point.Y);
            if (row == null)
                return Position.Empty;

            int? col = Columns.ColumnAtPoint(point.X);
            if (col == null)
                return Position.Empty;

            Position realPos = new Position(row.Value, col.Value);

            //Returns the logical position (using row/col span if present)
            return PositionToStartPosition(realPos);
        }