TX Text Control .NET for Windows Forms

TableRow Class

Class
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.

Description

An instance of the TableRow class represents a single row of a table in a Text Control document. It can be obtained from the table's row collection.

Syntax

public class TableRow

Examples

The following example shows how to handle table rows.

TXTextControl.TableCellFormat myCellFormat = new TXTextControl.TableCellFormat();
myCellFormat.BackColor = System.Drawing.Color.LightGreen;
myCellFormat.BottomBorderWidth = 40;

TXTextControl.TableRow myRow = myTable.Rows.GetItem(1);
myRow.MinimumHeight = 1440; // 1 inch
myRow.AllowPageBreak = false;
myRow.CellFormat = myCellFormat;

The following example creates a small report table and works with its structure.

textControl.Tables.Add(3, 3, 10);
Table table = textControl.Tables.GetItem(10);
TableRow tableRow = table.Rows[1];

Members

Properties

PropertyDescription
AllowPageBreakGets or sets a value specifying how the table row is formatted at page breaks. The property value is True, if the table row can be formatted across page breaks. The property value is False, if the table row must not be formatted across page breaks.
CellFormatGets or sets the formatting attributes of a table row. The property's value is an object of the type TableCellFormat.
IsHeaderGets or sets a value specifying whether the table row is part of the table's header. The property value is true, if the table row belongs to the header. Otherwise, it is false. A table header consists of one or more table rows which are repeated on top of each page when a single table extends over several pages.
MinimumHeightGets or sets the minimum height, in twips, of the table row. The table row is formatted with this height if the text is smaler. Otherwise the row grows as necessary. If the property value is zero, the table row's height is always determined through the containing text.
RowGets the number of the table row represented through this table row object.

Methods

MethodDescription
SelectSelects the table row.