Skip to main content

SpreadsheetControl.GetCellFromPoint(PointF) Method

Gets a worksheet cell located at the specified point.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v24.1.dll

NuGet Package: DevExpress.Win.Spreadsheet

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 snippet (auto-collected from DevExpress Examples) contains a reference 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