Back to Devexpress

TableRowCollection.InsertBefore(Int32) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-tablerowcollection-dot-insertbefore-x28-system-dot-int32-x29.md

latest3.4 KB
Original Source

TableRowCollection.InsertBefore(Int32) Method

Inserts a new row before the row specified by its index.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
TableRow InsertBefore(
    int rowIndex
)
vb
Function InsertBefore(
    rowIndex As Integer
) As TableRow

Parameters

NameTypeDescription
rowIndexInt32

An integer that is the zero-based index of a row before which a new row is inserted.

|

Returns

TypeDescription
TableRow

A TableRow interface specifying a newly inserted row.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the InsertBefore(Int32) method.

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#L25

csharp
// Add new rows to the table
table.Rows.InsertBefore(0);
table.Rows.InsertAfter(0);

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

csharp
//Add new rows to the table
TableRow newRowBefore = table.Rows.InsertBefore(0);
TableRow newRowAfter = table.Rows.InsertAfter(0);

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

vb
' Add new rows to the table
table.Rows.InsertBefore(0)
table.Rows.InsertAfter(0)

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

vb
'Add new rows to the table
Dim newRowBefore As TableRow = table.Rows.InsertBefore(0)
Dim newRowAfter As TableRow = table.Rows.InsertAfter(0)

See Also

TableRowCollection Interface

TableRowCollection Members

DevExpress.XtraRichEdit.API.Native Namespace