DGRow.calcLeftTopCoordinate

Syntax

calcLeftTopCoordinate();

Description

The calcLeftTopCoordinate method returns an object with coordinates of top left table row corner.

Comments

Returned object contains the following fields: left - coordinate X of top left row corner; top - coordinate Y of top left row corner.

Coordinate origin - top left corner of the first row.

Example

To execute the example, the HTML page must contain the DataGrid component named grid (see Example of Creating the DataGrid Component). Get coordinates of top left corner of the first table row:

// Get coordinates of top left corner of the first row
console.log("Coordinate X of top left corner of the first row: " + grid.getRows()[0].calcLeftTopCoordinate().left);
console.log("Coordinate Y of top left corner of the first row: " + grid.getRows()[0].calcLeftTopCoordinate().top);

As a result, the console displays coordinates of top left corner of the first table row:

Coordinate X of the top left corner of the first row: 0

Coordinate Y of the top left corner of the first row: 0

See also:

DGRow