Back to Devexpress

TableCellCollection.InsertBefore(Int32) Method

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

latest2.8 KB
Original Source

TableCellCollection.InsertBefore(Int32) Method

Inserts a new cell before the cell specified by its column number.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
TableCell InsertBefore(
    int columnIndex
)
vb
Function InsertBefore(
    columnIndex As Integer
) As TableCell

Parameters

NameTypeDescription
columnIndexInt32

An integer that is the column number (index in a row) of a cell before which a new cell is inserted.

|

Returns

TypeDescription
TableCell

A TableCell interface specifying the newly inserted cell.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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#L30

csharp
table.Rows[0].Cells.Append();
table.Rows[0].Cells.InsertBefore(0);

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

vb
table.Rows(0).Cells.Append()
table.Rows(0).Cells.InsertBefore(0)
table.Rows(0).FirstCell.PreferredWidthType = WidthType.Auto

See Also

TableCellCollection Interface

TableCellCollection Members

DevExpress.XtraRichEdit.API.Native Namespace