Skip to main content

Table Layout Dialogs

  • 3 minutes to read

The RichEditControl provides a number of dialogs, which allows end-users to work with tables: insert new tables into the document, as well as insert delete and split individual cells of existing tables.

Insert Table

The Insert Table dialog allows end-users to insert a new table with the specified number of rows and columns into a document.

RTETableInsertTableDialog

End-users can invoke this dialog by clicking Table on the Insert ribbon tab. Refer to the How to: Create the RichEditControl with a Ribbon UI topic for details on how to create the Ribbon UI for the RichEditControl. Executing the InsertTableCommand command invokes this dialog as well.

RTETablesInsertTableRibbonMenu

The maximum number of rows in the RichEditControl table is 32767, the maximum number of columns is 63. If an end-user enters the number of rows or columns that exceed the limit, an error icon appears, as shown below.

XtraRichEdit_Table_RowLimitError

To customize the default Insert Table dialog (modify captions, set default dialog values, implement custom validation, etc.) or substitute it with completely new dialog, handle the RichEditControl.InsertTableFormShowing event.

Also, you can programmatically insert a new table into the document. To do this, call the TableCollection.Create API method.

Insert Cells

The Insert Cells dialog enables end-users to insert a cell into the existing table and select the way to adjust table cells.

InsertCellsForm

End-users can invoke this dialog by clicking the Insert Cells dialog box launcher on the Table Tools | Layout ribbon tab…

RTETablesInsertCellsButton

…or from the context menu by selecting Insert > Insert Cells.

RTETablesInsertCellsContextMenu

Refer to the How to: Create the RichEditControl with a Ribbon UI topic for details on how to create the Ribbon UI for the RichEditControl. Executing the ShowInsertTableCellsFormCommand command invokes this dialog as well.

To customize the default Insert Cells dialog (modify captions, set default dialog values, implement custom validation, etc.) or substitute it with completely new dialog, handle the RichEditControl.InsertTableCellsFormShowing event.

Delete Cells

The Delete Cells dialog enables end-users to delete particular cells form a table and select a way of adjusting table cells.

DeleteCellsForm

End-users can invoke this dialog by clicking Delete on the Table Tools | Layout ribbon tab and selecting Delete Cells item from the invoked drop-down menu. Refer to the How to: Create the RichEditControl with a Bar UI topic for details on how to create the Ribbon UI for the RichEditControl. Executing the ShowDeleteTableCellsFormCommand command invokes this dialog as well.

RTETablesDeleteCellsButton

The dialog is also available from the context menu.

RTETablesDeleteCellsContextMenu

To customize the default Delete Cells dialog (modify captions, set default dialog values, implement custom validation, etc.) or substitute it with completely new dialog, handle the RichEditControl.DeleteTableCellsFormShowing event.

Split Cells

The Split Cells dialog enables end-users to split the selected cells into the specified number of rows and columns.

SplitCellsForm

End-users can invoke this dialog by clicking Split Cells on the Table Tools | Layout ribbon tab…

RTETablesSplitCellsButton

… or from the context menu.

RTEtAblesSplitCellsContextMenu

Refer to the How to: Create the RichEditControl with a Ribbon UI topic for details on how to create the Ribbon UI for the RichEditControl. Executing the ShowSplitTableCellsFormCommand command invokes this dialog as well.

To customize the default Split Cells dialog (modify captions, set default dialog values, implement custom validation, etc.) or substitute it with completely new dialog, handle the RichEditControl.SplitTableCellsFormShowing event.

See Also