New to Telerik UI for WPFStart a free 30-day trial

Properties and Methods

Updated on Sep 15, 2025

Properties

PropertyDescription
LayoutModeGets or sets the table layout mode.
PreferredWidthGets or sets the preferred width of the table.
FlowDirectionGets or sets the flow direction of the table contents.
CellPaddingGets or sets the cell padding.
BackgroundGets or sets the table background.
TableIndentGets or sets the table indent.
CellSpacingGets or sets the cell spacing.

Example 1: Set Table Properties

C#
    Table table = new Table();
    table.LayoutMode = TableLayoutMode.AutoFit;
    table.CellPadding = new Telerik.Windows.Documents.Layout.Padding(5);
    table.CellSpacing = 10;

Methods for adding or Inserting Rows

MethodDescription
AddRowAdds copy of the last TableRow in the table.
AddRowAbove(TableRow existingRow)Copies a specified TableRow and adds the copy above it.
AddRowAtIndexAdds a TableRow at a specific index.
AddRowBelow(TableRow existingRow)Copies a specified Telerik.Windows.Documents.Model.TableRow and adds the copy below it.
DeleteRow(TableRow row)Deletes a TableRow.

Example 2: Add Rows

C#
    Table table = new Table();

    var row = table.AddRow();
    var row2 = table.AddRowAtIndex(5);

Inserting and Deleting a Table

MethodDescription
DeleteTableDeletes the currently selected table.
DeleteTableColumnDeletes the currently selected column.
DeleteTableRowDeletes the currently selected row.
InsertTableInserts a table. Allows you to specify the number of rows and columns. Has an overload that allows you to specify if a Paragraph should be inserted before the table.
InsertTableColumnInserts a column at the end of the table.
InsertTableColumnToTheLeftInserts a column to the left of the selected one.
InsertTableColumnToTheRightInserts a column to the right of the selected one.
InsertTableRowInserts a row at the end of the table.
InsertTableRowAboveInserts a row above the selected one.
InsertTableRowBelowInserts a row below the selected one.

Example 3: Add or Delete Table

C#
    radRichTextBox.DeleteTable();
    radRichTextBox.InsertTable(table);

Methods for Formatting Tables

MethodDescription
ChangeTableBordersModifies the borders of the currently selected table via a TableBorders object.
ChangeTableCellBackgroundSets the background color of the currently selected cell.
ChangeTableCellBordersModifies the borders of the currently selected table via a TableCellBorders or a Border object.
ChangeTableCellSpacingModifies the spacing between the cells.
ChangeTableCellContentAlignmentModifies the horizontal and vertical content alignment of the currently selected cell.
ChangeTableCellVerticalContentAlignmentModifies the vertical alignment of the currently selected cell.
ChangeTableCellHorizontalContentAlignmentModifies the horizontal alignment of the currently selected cell.
ChangeTableCellPaddingModifies the padding of the currently selected cell.
ChangeTableDefaultCellPaddingModifies the default cell padding of the currently selected table.
ChangeTableLayoutModeModifies the layout mode of a table.
ChangeTableHorizontalAlignmentModifies the horizontal alignment of the currently selected table.
ChangeTableGridColumnWidthModifies the width of the column with the specified zero-based index.
ChangeTableRowHeightChanges the height of a table row.
MergeTableCellsMerges the currently selected cells.
UnmergeTableCellsSplits the currently selected table cell if it has been merged.

In versions earlier than Q1 2015 before and after each Table element is inserted a Paragraph. When the Table is inserted via the UI or the InsertTable() method this is done automatically, otherwise paragraphs should be inserted manually. In next versions the Paragraph before the Table is not mandatory.

Example 4: Change Existing Table Properties

C#
    radRichTextBox.UnmergeTableCells();
    radRichTextBox.ChangeTableLayoutMode(table, TableLayoutMode.AutoFit);