GetRowIndex
Returns an index of the parent row.
Parameters:
This method doesn't have any parameters.
Returns:
- Type
-
number
Example
Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table");
oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered - Accent 5"));
var oTable = Api.CreateTable(3, 3);
oTable.SetWidth("percent", 100);
oTable.SetStyle(oTableStyle);
oDocument.Push(oTable);
oTable.GetCell(0, 0).GetContent().GetElement(0).AddText("Row index: " + oTable.GetCell(0, 0).GetRowIndex());
builder.SaveFile("docx", "GetRowIndex.docx");
builder.CloseFile();
Resulting document