Skip to main content

GetParentRow

Returns a parent row of the current cell.

Syntax

expression.GetParentRow();

expression - A variable that represents a ApiTableCell class.

Parameters

This method doesn't have any parameters.

Returns

ApiTableRow | null

Example

This example shows how to get a parent row of the cell.

let doc = Api.GetDocument();
let tableStyle = doc.CreateStyle("CustomTableStyle", "table");
tableStyle.SetBasedOn(doc.GetStyle("Bordered"));
let table = Api.CreateTable(3, 3);
table.SetWidth("percent", 100);
table.SetStyle(tableStyle);
doc.Push(table);
table.GetCell(0, 0).GetContent().GetElement(0).AddText("Cell 1");
let parentRow = table.GetCell(0, 0).GetParentRow();
parentRow.SetHeight("atLeast", 720);