skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class Table

Inheritance
System.Object
DocumentElement
Block
Table
Inherited Members
DocumentElement.GetStyleProperty(IStylePropertyDefinition)
DocumentElement.GetStyleProperty(String)
DocumentElement.EnumerateChildrenOfType<T>()
DocumentElement.GetParentOfType<T>()
DocumentElement.CreateLayoutBox()
DocumentElement.CopyPropertiesFrom(DocumentElement)
DocumentElement.CopyPropertiesFromStyle(StyleDefinition)
DocumentElement.ExtractStyleFromProperties()
DocumentElement.ExtractStyleFromLocalProperties()
DocumentElement.InvalidateAssociatedBoxesArrange()
DocumentElement.InvalidateAssociatedBoxesMeasure()
DocumentElement.InvalidateAssociatedBoxesLayout()
DocumentElement.GetAssociatedLayoutBoxes()
DocumentElement.GetRootDocument()
DocumentElement.CreateDeepCopy()
DocumentElement.CreateShallowCopy()
DocumentElement.GetPropertyValueSource(IStylePropertyDefinition)
DocumentElement.ClearValue(IStylePropertyDefinition)
DocumentElement.OnRemoved()
DocumentElement.OnStyleChanging()
DocumentElement.add_StylePropertyChanged(StylePropertyChangeEventHandler)
DocumentElement.remove_StylePropertyChanged(StylePropertyChangeEventHandler)
DocumentElement.OnStylePropertyChanged(StylePropertyChangeEventArgs)
DocumentElement.OnParentChanging()
DocumentElement.OnParentChanged()
DocumentElement.add_PropertyValueChanged(StylePropertyChangeEventHandler)
DocumentElement.remove_PropertyValueChanged(StylePropertyChangeEventHandler)
DocumentElement.ChildIndex
DocumentElement.HasStyle
DocumentElement.Style
DocumentElement.StyleName
DocumentElement.Tag
DocumentElement.FirstLayoutBox
DocumentElement.LastLayoutBox
DocumentElement.IsFirstLayoutBoxInitialized
DocumentElement.DocumentElements
DocumentElement.Parent
DocumentElement.Children
DocumentElement.PreviousSibling
DocumentElement.NextSibling
DocumentElement.Cursor
DocumentElement.OriginalProperties
DocumentElement.RevisionInfo
DocumentElement.StyleChanging
DocumentElement.StyleChanged
DocumentElement.StylePropertyChanged
DocumentElement.ParentChanging
DocumentElement.ParentChanged
DocumentElement.PropertyValueChanged
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public class Table : Block

Constructors

Table()

Initializes a new instance of the Table class.

Declaration
public Table()

Table(Int32, Int32)

Initializes a new instance of the Table class.

Declaration
public Table(int rowsCount, int columnsCount)
Parameters
System.Int32 rowsCount

The number of rows of the table.

System.Int32 columnsCount

The number of columns of the table.

Fields

BackgroundProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<Color>, TableProperties> BackgroundProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.Media.Color>, TableProperties>

BordersProperty

Declaration
public static readonly StylePropertyDefinition<TableBorders, TableProperties> BordersProperty
Field Value
StylePropertyDefinition<TableBorders, TableProperties>

CellPaddingProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<Padding>, TableProperties> CellPaddingProperty
Field Value
StylePropertyDefinition<System.Nullable<Padding>, TableProperties>

CellSpacingProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<double>, TableProperties> CellSpacingProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Double>, TableProperties>

ColumnBandSizeProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<int>, TableProperties> ColumnBandSizeProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Int32>, TableProperties>

FlowDirectionProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<FlowDirection>, TableProperties> FlowDirectionProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.FlowDirection>, TableProperties>

HorizontalAlignmentProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<RadHorizontalAlignment>, TableProperties> HorizontalAlignmentProperty
Field Value
StylePropertyDefinition<System.Nullable<RadHorizontalAlignment>, TableProperties>

LayoutModeProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<TableLayoutMode>, TableProperties> LayoutModeProperty
Field Value
StylePropertyDefinition<System.Nullable<TableLayoutMode>, TableProperties>

PreferredWidthProperty

Declaration
public static readonly StylePropertyDefinition<TableWidthUnit, TableProperties> PreferredWidthProperty
Field Value
StylePropertyDefinition<TableWidthUnit, TableProperties>

RowBandSizeProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<int>, TableProperties> RowBandSizeProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Int32>, TableProperties>

TableIndentProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<double>, TableProperties> TableIndentProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Double>, TableProperties>

TableLookProperty

Declaration
public static readonly StylePropertyDefinition<TableLook, TableProperties> TableLookProperty
Field Value
StylePropertyDefinition<TableLook, TableProperties>

ThemeBackgroundProperty

Declaration
public static readonly StylePropertyDefinition<Nullable<ThemeColorsEnum>, TableProperties> ThemeBackgroundProperty
Field Value
StylePropertyDefinition<System.Nullable<ThemeColorsEnum>, TableProperties>

ThemeFillShadeProperty

Declaration
public static readonly StylePropertyDefinition<string, TableProperties> ThemeFillShadeProperty
Field Value
StylePropertyDefinition<System.String, TableProperties>

ThemeFillTintProperty

Declaration
public static readonly StylePropertyDefinition<string, TableProperties> ThemeFillTintProperty
Field Value
StylePropertyDefinition<System.String, TableProperties>

Properties

Background

Gets or sets the table background.

Declaration
[XamlSerializable]
public Color Background { get; set; }
Property Value
System.Windows.Media.Color

The background.

Borders

Gets or sets all borders of the table.

Declaration
[XamlSerializable]
public TableBorders Borders { get; set; }
Property Value
TableBorders

The borders.

CellPadding

Gets or sets the cell padding.

Declaration
[XamlSerializable]
public Padding CellPadding { get; set; }
Property Value
Padding

The cell padding.

CellSpacing

Gets or sets the cell spacing.

Declaration
[XamlSerializable]
public double CellSpacing { get; set; }
Property Value
System.Double

The cell spacing.

ColumnBandSize

Declaration
[XamlSerializable]
public int ColumnBandSize { get; set; }
Property Value
System.Int32

FlowDirection

Gets or sets the flow direction of the table contents.

Declaration
[XamlSerializable]
public FlowDirection FlowDirection { get; set; }
Property Value
System.Windows.FlowDirection

The flow direction.

Grid

Gets the grid of the table which keeps information about the rows and columns.

Declaration
public TableGrid Grid { get; }
Property Value
TableGrid

The grid.

GridColumnWidthsSerializationInfo

Declaration
[XamlSerializable]
public TableGridColumnWidthsSerializationInfo GridColumnWidthsSerializationInfo { get; set; }
Property Value
TableGridColumnWidthsSerializationInfo

HasFixedStructure

This property supports control infrastructure and is not intended for use directly from your code.

Declaration
[XamlSerializable]
public bool HasFixedStructure { get; set; }
Property Value
System.Boolean

HorizontalAlignment

Gets or sets the horizontal alignment.

Declaration
[XamlSerializable]
public RadHorizontalAlignment HorizontalAlignment { get; set; }
Property Value
RadHorizontalAlignment

The horizontal alignment.

LayoutMode

Gets or sets then table layout mode.

Declaration
[XamlSerializable]
public TableLayoutMode LayoutMode { get; set; }
Property Value
TableLayoutMode

The layout mode.

PreferredWidth

Gets or sets the preferred width of the table.

Declaration
[XamlSerializable]
public TableWidthUnit PreferredWidth { get; set; }
Property Value
TableWidthUnit

The preferred width.

RowBandSize

Declaration
[XamlSerializable]
public int RowBandSize { get; set; }
Property Value
System.Int32

Rows

Gets the rows.

Declaration
public TableRowCollection Rows { get; }
Property Value
TableRowCollection

The rows.

TableIndent

Gets or sets the table indent.

Declaration
[XamlSerializable]
public double TableIndent { get; set; }
Property Value
System.Double

The table indent.

TableLook

Gets or sets the table look.

The look of a table defines the components of the conditional formatting which will be applied to it.

Declaration
[XamlCompositePropertySerializable]
public TableLook TableLook { get; set; }
Property Value
TableLook

The table look.

ThemeBackground

Gets or sets the theme background.

Declaration
[XamlSerializable]
public ThemeColorsEnum ThemeBackground { get; set; }
Property Value
ThemeColorsEnum

The theme background.

ThemeFillShade

Declaration
[XamlSerializable]
public string ThemeFillShade { get; set; }
Property Value
System.String

ThemeFillTint

Declaration
[XamlSerializable]
public string ThemeFillTint { get; set; }
Property Value
System.String

Methods

AddColumn()

Adds a column after the last one in the table.

Declaration
public IEnumerable<TableCell> AddColumn()
Returns
System.Collections.Generic.IEnumerable<TableCell>

A collection of the added TableCells.

AddColumnToTheLeft(TableCell)

Adds a column on the left side of an existing cell.

Declaration
public IEnumerable<TableCell> AddColumnToTheLeft(TableCell existingCell)
Parameters
TableCell existingCell

The existing TableCell.

Returns
System.Collections.Generic.IEnumerable<TableCell>

A collection of the added TableCells.

Exceptions
System.InvalidOperationException

Cell must be from the same table.

AddColumnToTheRight(TableCell)

Adds a column on the right side of an existing cell.

Declaration
public IEnumerable<TableCell> AddColumnToTheRight(TableCell existingCell)
Parameters
TableCell existingCell

The existing TableCell.

Returns
System.Collections.Generic.IEnumerable<TableCell>

A collection of the added TableCells.

Exceptions
System.InvalidOperationException

Cell must be from the same table.

AddRow()

Adds copy of the last TableRow in the table. If the table doesn't have any rows, then a new TableRow is added.

Declaration
public TableRow AddRow()
Returns
TableRow

The newly added row.

AddRow(TableRow)

Adds a TableRow as a last row in the table.

Declaration
public TableRow AddRow(TableRow newRow)
Parameters
TableRow newRow

The new TableRow.

Returns
TableRow

The added TableRow instance.

Exceptions
System.ArgumentException

Row already added to this table.

AddRowAbove(TableRow)

Copies a specified TableRow and adds the copy above it.

Declaration
public TableRow AddRowAbove(TableRow existingRow)
Parameters
TableRow existingRow

The existing row.

Returns
TableRow

The added TableRow instance.

AddRowAbove(TableRow, TableRow)

Adds a TableRow above an existing one.

Declaration
public TableRow AddRowAbove(TableRow existingRow, TableRow newRow)
Parameters
TableRow existingRow

The existing TableRow.

TableRow newRow

The new TableRow.

Returns
TableRow

The added TableRow instance.

Exceptions
System.InvalidOperationException

Row must be from the same table.

System.ArgumentException

Row already added.

AddRowAtIndex(Int32)

Adds a copy of the nearest TableRow at a specific index.

Declaration
public TableRow AddRowAtIndex(int index)
Parameters
System.Int32 index

The index.

Returns
TableRow

The added TableRow instance.

Exceptions
System.ArgumentException

Incorrect index value.

AddRowAtIndex(Int32, TableRow)

Adds a TableRow at a specific index.

Declaration
public TableRow AddRowAtIndex(int index, TableRow rowToAdd)
Parameters
System.Int32 index

The index.

TableRow rowToAdd

The row to add.

Returns
TableRow

The added TableRow instance.

Exceptions
System.ArgumentException

Incorrect index value.

AddRowBelow(TableRow)

Copies a specified TableRow and adds the copy below it.

Declaration
public TableRow AddRowBelow(TableRow existingRow)
Parameters
TableRow existingRow

The existing TableRow.

Returns
TableRow

The added TableRow instance.

AddRowBelow(TableRow, TableRow)

Adds a TableRow below an existing one.

Declaration
public TableRow AddRowBelow(TableRow existingRow, TableRow newRow)
Parameters
TableRow existingRow

The existing TableRow.

TableRow newRow

The new TableRow.

Returns
TableRow

The added TableRow instance.

Exceptions
System.InvalidOperationException

Row must be from the same table.

System.ArgumentException

Row already added.

CopyPropertiesFromOverride(DocumentElement)

Copies the properties of a Table instance to the current object.

Declaration
protected override void CopyPropertiesFromOverride(DocumentElement fromElement)
Parameters
DocumentElement fromElement

The Table to copy the properties from.

Overrides
DocumentElement.CopyPropertiesFromOverride(DocumentElement)

CreateLayoutBox(DocumentStructureCollection)

Creates a new TableLayoutBox.

Declaration
public override LayoutBox CreateLayoutBox(DocumentStructureCollection documentCollection)
Parameters
DocumentStructureCollection documentCollection

The document collection.

Returns
LayoutBox

The new TableLayoutBox.

Overrides
DocumentElement.CreateLayoutBox(DocumentStructureCollection)

CreateNewElementInstance()

Creates a new instance of the Table class.

Declaration
protected override DocumentElement CreateNewElementInstance()
Returns
DocumentElement

The new instance.

Overrides
DocumentElement.CreateNewElementInstance()

DeleteRow(TableRow)

Deletes a TableRow.

Declaration
public void DeleteRow(TableRow row)
Parameters
TableRow row

The row to delete.

Exceptions
System.InvalidOperationException

Row must be from the same table.

GetGridColumnWidth(Int32)

Gets the width of the grid column.

Declaration
public TableWidthUnit GetGridColumnWidth(int gridColumnIndex)
Parameters
System.Int32 gridColumnIndex

Index of the grid column. This index should not be affected of any merged cells.

Returns
TableWidthUnit

A TableWidthUnit representing the width of the column.

OnStyleChanged()

Declaration
protected override void OnStyleChanged()
Overrides
DocumentElement.OnStyleChanged()

SetGridColumnWidth(Int32, TableWidthUnit)

Sets the width of the grid column.

Declaration
public void SetGridColumnWidth(int gridColumnIndex, TableWidthUnit width)
Parameters
System.Int32 gridColumnIndex

Index of the grid column. This index should not be affected of any merged cells.

TableWidthUnit width

The width.

Exceptions
System.ArgumentOutOfRangeException

gridColumnIndex should be greater than or equal to 0.

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.