Back to Devexpress

TableBorder Class

aspnetcore-js-devexpress-dot-richedit-0fa6a2cf.md

latest1.8 KB
Original Source

TableBorder Class

Contains table border settings.

Declaration

ts
export class TableBorder

Remarks

Use the Table.borders property to access table borders and customize their settings. The TableCell.borders property allows you to access and customize cell borders.

Note

Cell border settings take priority over table border settings.

The following code example customizes table and cell borders:

js
const subDocument = richEdit.selection.activeSubDocument;
const table = subDocument.tables.getByIndex(0);
const outerBorder = {style: 1, width: 30, color: '#4974a5'};
const innerBorder = {style: 4, width: 15, color: '#d3d3d3'};
table.borders = { bottom: outerBorder, top: outerBorder, left: outerBorder, right: outerBorder,
                  insideHorizontal: innerBorder, insideVertical: innerBorder};
const cell = table.rows.getByIndex(1).cells.getByIndex(0);
cell.borders = { top: { style: 5, color: 'blue', width: 20} }

Properties

color Property

Specifies the border color.

Declaration

ts
color: string

Property Value

TypeDescription
string

The border color.

|

style Property

Specifies the border line style.

Declaration

ts
style: BorderLineStyle

Property Value

TypeDescription
BorderLineStyle

An enumeration value.

|

width Property

Specifies the border line width.

Declaration

ts
width: number

Property Value

TypeDescription
number

The border line width in twips.

|