Back to Devexpress

TableRow.BreakAcrossPages Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-tablerow-7b67c4ce.md

latest4.4 KB
Original Source

TableRow.BreakAcrossPages Property

Specifies whether the table row can break across pages.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
bool BreakAcrossPages { get; set; }
vb
Property BreakAcrossPages As Boolean

Property Value

TypeDescription
Boolean

true to break the row across pages; otherwise, false.

|

Remarks

The code sample below toggles Repeat row as header and Break row across pages options in code:

View Example

csharp
using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
    AdjustTableRows(wordProcessor.Document);

    wordProcessor.SaveDocument("DocumentWithTables.docx",
         DocumentFormat.Docx);
}

private static void AdjustTableRows(Document document)
{
    Table table = document.Tables[0];
    table.BeginUpdate();

    //Repeat first three rows as header:
    table.Rows[0].RepeatAsHeaderRow = true;
    table.Rows[1].RepeatAsHeaderRow = true;
    table.Rows[2].RepeatAsHeaderRow = true;

    //Break last row across pages:
    table.LastRow.BreakAcrossPages = true;
    table.EndUpdate();
}
vb
Using wordProcessor As New RichEditDocumentServer()
    AdjustTableRows(wordProcessor.Document)

    wordProcessor.SaveDocument("DocumentWithTables.docx",
         DocumentFormat.Docx)
End Using

private static void AdjustTableRows(Document document)
    Dim table As Table = document.Tables(0)
    table.BeginUpdate()

    'Repeat first three rows as header:
    table.Rows(0).RepeatAsHeaderRow = True
    table.Rows(1).RepeatAsHeaderRow = True
    table.Rows(2).RepeatAsHeaderRow = True

    'Break last row across pages:
    table.LastRow.BreakAcrossPages = True
    table.EndUpdate()
End Sub

The following code snippets (auto-collected from DevExpress Examples) contain references to the BreakAcrossPages property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-richedit-tables-simple-example/CS/TablesSimpleExample/Form1.cs#L73

csharp
// Break last row across pages:
table.LastRow.BreakAcrossPages = true;
table.EndUpdate();

word-document-api-table-examples/CS/Program.cs#L249

csharp
//Break last row across pages:
table.LastRow.BreakAcrossPages = true;
table.EndUpdate();

winforms-richedit-tables-simple-example/VB/TablesSimpleExample/Form1.vb#L61

vb
' Break last row across pages:
table.LastRow.BreakAcrossPages = True
table.EndUpdate()

word-document-api-table-examples/VB/Program.vb#L201

vb
'Break last row across pages:
table.LastRow.BreakAcrossPages = True
table.EndUpdate()

See Also

TableRow Interface

TableRow Members

DevExpress.XtraRichEdit.API.Native Namespace