Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TableContentHorizontalAlignment Enum

List the horizontal alignment options for table content.

#Declaration

TypeScript
export enum TableContentHorizontalAlignment {
    Left = 0,
    Right = 1,
    Center = 2
}

#Members

Name Description
Center

Center alignment.

Left

Left alignment.

Right

Right alignment.

#Remarks

Use the Table.contentHorizontalAlignment property to horizontally align content in all table cells. The TableCell.contenHorizontalAlignment property allows you horizontally align content in a particular cell.

Note

A cell’s contentHorizontalAlignment property takes priority over the table’s contentHorizontalAlignment property.

The following example centers content horizontally in the entire table and aligns a particular cell’s content to the right:

js
const subDocument = richEdit.selection.activeSubDocument;
const table = subDocument.tables.getByIndex(0);
table.contentHorizontalAlignment = DevExpress.RichEdit.TableContentHorizontalAlignment.Center;
cell = table.rows.getByIndex(0).cells.getByIndex(0);
cell.contentHorizontalAlignment = DevExpress.RichEdit.TableContentHorizontalAlignment.Right;