Skip to main content
Table of Contents

TTMSFNCCustomDataGrid.XYToCell Method

Returns the cell under a point.

API unit family: TMSFNCDataGrid Declaring type: TTMSFNCCustomDataGrid

Syntax

FMX.TMSFNCDataGrid.hppPascalC++
function XYToCell(X, Y: Double): TTMSFNCDataGridCellCoord;
TTMSFNCDataGridCellCoord __fastcall XYToCell(double X, double Y);

Remarks

Only currently rendered cells are hit-tested. Cells of a nested sub-grid are resolved on the root grid level; use XYToRenderer to find the nested renderer.

Parameters

Name Description
X Horizontal position relative to the control.
Y Vertical position relative to the control.

Returns

The display coordinate of the rendered cell under the point, or (-1, -1) when the point is not over a cell.