Skip to main content
A newer version of this page is available. .

SpreadsheetControl.GetCellFromPoint(PointF) Method

Gets a worksheet cell located at the specified point.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v19.1.dll

Declaration

public Cell GetCellFromPoint(
    PointF clientPoint
)

Parameters

Name Type Description
clientPoint PointF

A PointF structure specifying the location for which the position is retrieved. The point coordinates are measured in documents units.

Returns

Type Description
Cell

A Cell object.

Remarks

The following code snippet displays cell coordinates of the cell located under the mouse cursor.


spreadsheetControl1.MouseMove+=spreadsheetControl1_MouseMove;
// ...
private void spreadsheetControl1_MouseMove(object sender, MouseEventArgs e)
{
    Cell cell = spreadsheetControl1.GetCellFromPoint(new PointF(e.X, e.Y));
    this.Text = cell == null ? "No Cell" : cell.GetReferenceA1() ;
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetCellFromPoint(PointF) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also