New to Telerik Document Processing? Start a free 30-day trial

Table

Class

Grid-based block element organizing content into rows and cells, supporting cell spanning, borders, shading, and automatic grid layout calculation.

Definition

Namespace:Telerik.Documents.Flow.Model

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

C#
public sealed class Table : BlockBase, IElementWithStyle, IElementWithProperties

Inheritance: objectDocumentElementBaseBlockBaseTable

Implements: IElementWithPropertiesIElementWithStyle

Inherited Members BlockBase.BlockContainerDocumentElementBase.EnumerateChildrenOfType<T>()DocumentElementBase.DocumentDocumentElementBase.Parent

Constructors

Initializes a new Table pre-populated with the specified number of rows and columns, each containing an empty cell.

C#
public Table(RadFlowDocument document, int rows, int columns)
Parameters:documentRadFlowDocument

The document.

rowsint

The number of rows.

columnsint

The number of columns.

Initializes a new empty Table with no rows or columns in the specified document.

C#
public Table(RadFlowDocument document)
Parameters:documentRadFlowDocument

The document in which the element will be added.

Fields

Style property definition for table horizontal alignment within the page or column.

C#
public static readonly StylePropertyDefinition<Alignment?> AlignmentPropertyDefinition

Style property definition for table background fill color applied behind all cells.

C#
public static readonly StylePropertyDefinition<ThemableColor> BackgroundColorPropertyDefinition

Style property definition for the number of columns in each alternating column band when applying conditional table formatting.

C#
public static readonly StylePropertyDefinition<int?> ColumnBandingPropertyDefinition

Style property definition for cell flow direction, controlling left-to-right or right-to-left cell ordering and content layout.

C#
public static readonly StylePropertyDefinition<FlowDirection?> FlowDirectionPropertyDefinition

Style property definition for horizontal indentation added before the table's leading edge in device independent pixels (1/96 inch).

C#
public static readonly StylePropertyDefinition<double?> IndentPropertyDefinition

Style property definition for table layout algorithm, controlling whether column widths are automatically calculated or use fixed values.

C#
public static readonly StylePropertyDefinition<TableLayoutType?> LayoutTypePropertyDefinition

Style property definition for conditional formatting components (first/last row/column, banded rows/columns) applied from the table style.

C#
public static readonly StylePropertyDefinition<TableLooks?> LooksPropertyDefinition

Style property definition for controlling whether floating tables can overlap this table's area when positioned.

C#
public static readonly StylePropertyDefinition<bool?> OverlapPropertyDefinition

Style property definition for table preferred width, supporting auto, fixed, and percentage-based width specifications.

C#
public static readonly StylePropertyDefinition<TableWidthUnit> PreferredWidthPropertyDefinition

Style property definition for the number of rows in each alternating row band when applying conditional table formatting.

C#
public static readonly StylePropertyDefinition<int?> RowBandingPropertyDefinition

Style property definition for shading pattern color, controlling the foreground color used in patterned background fills.

C#
public static readonly StylePropertyDefinition<ThemableColor> ShadingPatternColorPropertyDefinition

Style property definition for shading pattern, controlling the fill pattern applied to the table background.

C#
public static readonly StylePropertyDefinition<ShadingPattern?> ShadingPatternPropertyDefinition

Style property definition for table borders, controlling the width, color, and pattern for outer and inner border lines.

C#
public static readonly StylePropertyDefinition<TableBorders> TableBordersPropertyDefinition

Style property definition for default cell padding applied to all cells unless overridden at the cell level.

C#
public static readonly StylePropertyDefinition<Padding> TableCellPaddingPropertyDefinition

Style property definition for spacing between adjacent cells and between cells and table edges in device independent pixels (1/96 inch).

C#
public static readonly StylePropertyDefinition<double?> TableCellSpacingPropertyDefinition

Properties

Horizontal alignment of the table within the page or column, controlling left, center, or right positioning.

C#
public Alignment Alignment { get; set; }
Property Value:

The default value is Left.

Border styles for the table's edges and internal dividers, controlling width, color, and pattern for outer and inner borders.

C#
public TableBorders Borders { get; set; }
Property Value:

The borders.

Flow direction for cell content and table layout, controlling left-to-right or right-to-left cell ordering and text direction.

C#
public FlowDirection FlowDirection { get; set; }
Property Value:

The default value is LeftToRight.

Number of columns in the calculated table grid, accounting for cell column spans; automatically computed from table structure.

C#
public int GridColumnsCount { get; }
Property Value:

The grid columns count.

Number of rows in the calculated table grid, accounting for cell row spans; automatically computed from table structure.

C#
public int GridRowsCount { get; }
Property Value:

The grid rows count.

Indicates whether cell spacing is applied, determined by checking if TableCellSpacing exceeds zero.

C#
public bool HasCellSpacing { get; }
Property Value:

True if there is cell spacing.

Distance added before the leading edge of the table in device independent pixels (1/96 inch), shifting the table horizontally.

C#
public double Indent { get; set; }
Property Value:

The default value is 0.

Layout algorithm applied to the table, controlling whether column widths are automatically calculated (AutoFit) or use fixed widths.

C#
public TableLayoutType LayoutType { get; set; }
Property Value:

The default value is AutoFit.

Controls which conditional formatting components of the table style are applied, such as first/last row, first/last column, and banded rows/columns.

C#
public TableLooks Looks { get; set; }
Property Value:

The default value is BandedRows | BandedColumns.

Controls whether this floating table allows other floating tables to overlap its area when positioned on the page.

C#
public bool Overlap { get; set; }
Property Value:

The default value is true.

Preferred width specification for the table, supporting auto, fixed, and percentage-based widths relative to the container.

C#
public TableWidthUnit PreferredWidth { get; set; }
Property Value:

The width of the preferred.

Table formatting properties, providing access to alignment, borders, spacing, padding, width, layout algorithm, and flow direction settings.

C#
public TableProperties Properties { get; }
Property Value:

The properties.

Collection of rows contained in this table, providing add, insert, and remove operations for table structure.

C#
public TableRowCollection Rows { get; }
Property Value:

The rows.

Background shading applied to the entire table, controlling fill color, pattern, and pattern color behind all cells.

C#
public Shading Shading { get; }
Property Value:

The shading.

Table style identifier applied to this table, enabling consistent formatting via style inheritance from the document's style repository.

C#
public string StyleId { get; set; }
Property Value:

The style id.

Implements: IElementWithStyle.StyleId

Default padding for all cells in this table, defining the space between cell borders and content unless overridden at the cell level.

C#
public Padding TableCellPadding { get; set; }
Property Value:

The table cell padding.

Space between adjacent cells and between cells and table edges in device independent pixels (1/96 inch), creating visual separation.

C#
public double TableCellSpacing { get; set; }
Property Value:

The table cell spacing.

Methods

Creates a deep copy of this table including all rows, cells, and formatting properties, associated to the same document.

C#
public Table Clone()
Returns:

Table

The cloned element.

Creates a deep copy of this table including all rows, cells, and formatting properties, associated to the specified document for cross-document copying.

C#
public Table Clone(RadFlowDocument document)
Parameters:documentRadFlowDocument

The document to which the cloned element should be associated.

Returns:

Table

The cloned element.

Called when child element is added.

C#
protected override void OnChildAdded(DocumentElementBase child)
Parameters:childDocumentElementBase

The child element.

Overrides: DocumentElementBase.OnChildAdded(DocumentElementBase)

Called when child element is removed.

C#
protected override void OnChildRemoved(DocumentElementBase child)
Parameters:childDocumentElementBase

The child element.

Overrides: DocumentElementBase.OnChildRemoved(DocumentElementBase)