Get Started
Usage API
More information

ApiTableRowPr

new ApiTableRowPr()

Class representing the table row properties.

Methods

Name Description
GetClassType

Returns a type of the ApiTableRowPr class.

SetHeight

Sets the height to the current table row within the current table.

SetTableHeader

Specifies that the current table row will be repeated at the top of each new page wherever this table is displayed. This gives this table row the behavior of a 'header' row on each of these pages. This element can be applied to any number of rows at the top of the table structure in order to generate multi-row table headers.

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table");
oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered - Accent 5"));
oTable = Api.CreateTable(3, 3);
oTable.SetWidth("percent", 100);
oTable.SetTableLook(true, true, true, true, false, false);
oTableRowPr = oTableStyle.GetTableRowPr();
oTableRowPr.SetTableHeader(true);
oTableRowPr.SetHeight("atLeast", 720);
oTable.SetStyle(oTableStyle);
oDocument.Push(oTable);
sClassType = oTableRowPr.GetClassType();
oParagraph = oDocument.GetElement(0);
oParagraph.AddText("Class Type = " + sClassType);
oParagraph.AddLineBreak();
oParagraph.AddText("We create a 3x3 table and set all table rows as the table headers:");
builder.SaveFile("docx", "ApiTableRowPr.docx");
builder.CloseFile();

Resulting document