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

TableWidthType Enum

Lists values that specify how the component determines the table or cell width.

#Declaration

TypeScript
export enum TableWidthType {
    Auto = 1,
    Percent = 2,
    Twips = 3
}

#Members

Name Description
Auto

The TableWidth.value property does not affect the table or cell width. The width is calculated automatically based on content.

Percent

The TableWidth.value property specifies the cell or table width as a percentage of the parent element’s width.

Twips

The TableWidth.value property specifies the cell or table width in twips.

#Remarks

Use the Table.width or TableCell.width property to specify the table or cell width.

You can change the following width settings:

width.value
Specifies the table or cell width value.
width.type
Specifies how the component determines the table or cell width. The following options are available:
  • Auto – The TableWidth.value property does not affect the table or cell width. The width is calculated automatically based on content.
  • Percent – The TableWidth.value property specifies the cell or table width as a percentage of the parent element’s width.
  • Twips – The TableWidth.value property specifies the cell or table width in twips.
js
const subDocument = richEdit.selection.activeSubDocument;
const table = subDocument.tables.getByIndex(0);
table.width.type = DevExpress.RichEdit.TableWidthType.Auto;
for (let i = 0; i < table.rows.count; i++) {
    const row = table.rows.getByIndex(i);
    for (let j = 0; j < row.cells.count; j++) {
        const cell = row.cells.getByIndex(j);
        cell.width = { type: DevExpress.RichEdit.TableWidthType.Auto, value: 0 }
    }
}