A table is an abstract type of block-level content in a document. A table is a set of paragraphs arranged in rows and columns. In a sub-document, the information about existing tables is stored within a specific table list. A table's textual contents (paragraphs) are maintained within the sub-document's text buffer.
A table is a logical unit that contains child elements (rows and cells), defines element-specific formatting settings and specifies the text buffer intervals to which these settings should be applied. Programmatically, a table is implemented as the Table client object. A list of table objects in the active sub-document can be accessed through the tablesInfo client property (SubDocument.tablesInfo) in the following notation:
A table maintains a list of table rows. Each row, in its turn, maintains a list of its cells. A table and all its child elements (rows and cells) have their own positions within the text buffer of a sub-document. A table's start position equals the start position of the first cell within the table's first row.
A table can be defined using the following characteristics.
The name of a separate style object containing uniform table formatting settings.
The RichEdit processes all tables as tables of a fixed width. A fixed width table is not dynamically resized based on its contents. The final width of cells in a fixed width table depends only on the table preferred width and the cell preferred width, and does not depend on the cell content. As a result, the display of tables in the RichEdit can differ between tables of the XtraRichEdit and Microsoft Word.
The following client commands are available for manipulating tables and their settings. Call the commands in the notation given below:
Gets a command to invoke the Split Cells dialog window.
Using a table style allows setting common formatting properties of multiple tables at once. A table style contains settings that affect character properties, paragraph properties, cell properties, row properties and table properties.
A list of table styles can be accessed using the following tableStylesInfo property in the notation given below:
Gets a command to change the selected table's style options.
Manipulation Through UI
The ASPxRichEdit control provides support for complex tables, as well as nested ones. An end-user can insert tables, edit a table layout by splitting and merging cells, and insert rows and columns. Borders and shading can be applied individually for each cell in a table.
An end-user can easily insert a table using the dropdown window of the Table ribbon button located in the ribbon's Insert tab in the Tables group.
The RichEdit provides a set of ribbon commands to work with tables. These commands are available through two specific ribbon context tabs - Design and Layout.
The Design tab provides end-users with the ability to set borders, border color and cell shading.
The Layout tab allows you to perform complex table element operations, such as merging cells, inserting and deleting rows and columns, and defining the properties of all main table elements.
End users can change table settings and table layout using Table Dialogs.
Was this page helpful?
Thanks for your feedback! Any other suggestions? Tell us here.