Search Results for

    Show / Hide Table of Contents

    Class TableRow

    Represents a row element within a table.

    Inheritance
    System.Object
    ContentElement
    ParentElement
    TableElements
    TableRow
    Implements
    IronSoftware.Abstractions.IDocumentElement
    IronSoftware.IDocumentObject
    System.ICloneable
    System.Collections.Generic.IEnumerable<TableCell>
    System.Collections.IEnumerable
    Inherited Members
    TableElements.SetBorders(TableBorders)
    TableElements.ExtractImages()
    TableElements.ExtractShapes()
    TableElements.Borders
    TableElements.BackgroundColor
    ParentElement.AddChild(ContentElement[])
    ParentElement.InsertChildToIndex(Int32, ContentElement[])
    ParentElement.Remove()
    ParentElement.RemoveChildren(ContentElement[])
    ParentElement.RemoveAllChildren()
    ParentElement.ExtractElements<T>()
    ParentElement.GetChildByIndex<T>(Int32)
    ParentElement.Clone()
    ParentElement.CloneObject()
    ParentElement.LogObjectTree()
    ParentElement.DefaultTextStyle
    ParentElement.Texts
    ParentElement.Tables
    ParentElement.Children
    ContentElement.Status
    ContentElement.Replace(ContentElement)
    ContentElement.GetIndex<T>()
    ContentElement.Parent
    ContentElement.ObjNum
    ContentElement.PageIndex
    ContentElement.DocumentId
    Namespace: IronWord.Models
    Assembly: IronWord.dll
    Syntax
    public class TableRow : TableElements, IDocumentElement, IDocumentObject, ICloneable, IEnumerable<TableCell>, IEnumerable

    Constructors

    TableRow()

    Initializes a new instance of the TableRow class.

    Declaration
    public TableRow()

    TableRow(TableCell[])

    Initializes a new instance of the TableRow class with the specified cells.

    Declaration
    public TableRow(params TableCell[] cells)
    Parameters
    Type Name Description
    TableCell[] cells

    The table cells to be added.

    Properties

    Cells

    Gets the list of TableCell elements contained within this row. Thread-safe implementation with caching for performance.

    Declaration
    public List<TableCell> Cells { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<TableCell>

    Height

    Gets or sets the height of the table row in inches. The height is internally stored in EMU (English Metric Units) and converted to inches for display. Setting this property will automatically convert the inch value to EMU for internal storage.

    Declaration
    public double Height { get; set; }
    Property Value
    Type Description
    System.Double

    Index

    The Index of this Shape in parent Children list.

    Declaration
    public int Index { get; set; }
    Property Value
    Type Description
    System.Int32

    Item[Int32]

    Gets or sets the TableCell at the specified column index within the row.

    Declaration
    public TableCell this[int column] { get; set; }
    Parameters
    Type Name Description
    System.Int32 column

    The index of the column within the row.

    Property Value
    Type Description
    TableCell

    The TableCell at the specified column index.

    Methods

    AddCell(TableCell)

    Adds a new TableCell to the row.

    Declaration
    public void AddCell(TableCell cell)
    Parameters
    Type Name Description
    TableCell cell

    The TableCell object to be added to the row.

    CloneStruct()

    Creates and returns a new instance of TableRow with the same structure (number of cells and their structure) as the current row.

    Declaration
    public TableRow CloneStruct()
    Returns
    Type Description
    TableRow

    A cloned TableRow with the same structure as the current row.

    GetEnumerator()

    Returns an enumerator that iterates through the collection of TableCell elements in the row.

    Declaration
    public IEnumerator<TableCell> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<TableCell>

    An enumerator that can be used to iterate through the collection of TableCell elements in the row.

    GetHeight(MeasurementUnit)

    Gets the height of the table row in the specified measurement unit. The height is internally stored in EMU and converted to the requested unit.

    Declaration
    public double GetHeight(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit for the height. Default is twentieths of a point (Twips).

    Returns
    Type Description
    System.Double

    The height of the table row in the specified measurement unit.

    InsertRowAfterSelf()

    Inserts a new TableRow after this row within the parent table with the same structure (number of cells and their structure) as the current row.

    Declaration
    public void InsertRowAfterSelf()

    InsertRowAfterSelf(TableRow)

    Inserts a new TableRow after this row within the parent table.

    Declaration
    public void InsertRowAfterSelf(TableRow row)
    Parameters
    Type Name Description
    TableRow row

    The TableRow object to be inserted after this row.

    InsertRowBeforeSelf()

    Inserts a new TableRow before this row within the parent table with the same structure (number of cells and their structure) as the current row.

    Declaration
    public void InsertRowBeforeSelf()

    InsertRowBeforeSelf(TableRow)

    Inserts a new TableRow before this row within the parent table.

    Declaration
    public void InsertRowBeforeSelf(TableRow row)
    Parameters
    Type Name Description
    TableRow row

    The TableRow object to be inserted before this row.

    SetHeight(Double, MeasurementUnit)

    Sets the height of the table row. The height value will be converted to EMU for internal storage.

    Declaration
    public void SetHeight(double height, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Double height

    The height value to set.

    MeasurementUnit measurementUnit

    The measurement unit of the provided height. Default is twentieths of a point (Twips).

    Implements

    IronSoftware.Abstractions.IDocumentElement
    IronSoftware.IDocumentObject
    System.ICloneable
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable

    Inherited members

    SetBorders(TableBorders)
    ExtractImages()
    ExtractShapes()
    Borders
    BackgroundColor
    AddChild(ContentElement[])
    InsertChildToIndex(Int32, ContentElement[])
    Remove()
    RemoveChildren(ContentElement[])
    RemoveAllChildren()
    ExtractElements<T>()
    GetChildByIndex<T>(Int32)
    Clone()
    CloneObject()
    LogObjectTree()
    DefaultTextStyle
    Texts
    Tables
    Children
    Status
    Replace(ContentElement)
    GetIndex<T>()
    Parent
    ObjNum
    PageIndex
    DocumentId
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    Want to deploy IronWord to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronWord free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.