Compartilhar via


TableRow Class

Table Row.When the object is serialized out as xml, its qualified name is w:tr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Wordprocessing.TableRow

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(DeletedRun))> _
<ChildElementInfoAttribute(GetType(RunConflictInsertion), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(RunConflictDeletion), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(TablePropertyExceptions))> _
<ChildElementInfoAttribute(GetType(TableRowProperties))> _
<ChildElementInfoAttribute(GetType(TableCell))> _
<ChildElementInfoAttribute(GetType(CustomXmlCell))> _
<ChildElementInfoAttribute(GetType(SdtCell))> _
<ChildElementInfoAttribute(GetType(ProofError))> _
<ChildElementInfoAttribute(GetType(PermStart))> _
<ChildElementInfoAttribute(GetType(PermEnd))> _
<ChildElementInfoAttribute(GetType(BookmarkStart))> _
<ChildElementInfoAttribute(GetType(BookmarkEnd))> _
<ChildElementInfoAttribute(GetType(CommentRangeStart))> _
<ChildElementInfoAttribute(GetType(CommentRangeEnd))> _
<ChildElementInfoAttribute(GetType(MoveFromRangeStart))> _
<ChildElementInfoAttribute(GetType(MoveFromRangeEnd))> _
<ChildElementInfoAttribute(GetType(MoveToRangeStart))> _
<ChildElementInfoAttribute(GetType(MoveToRangeEnd))> _
<ChildElementInfoAttribute(GetType(CustomXmlInsRangeStart))> _
<ChildElementInfoAttribute(GetType(CustomXmlInsRangeEnd))> _
<ChildElementInfoAttribute(GetType(CustomXmlDelRangeStart))> _
<ChildElementInfoAttribute(GetType(CustomXmlDelRangeEnd))> _
<ChildElementInfoAttribute(GetType(CustomXmlMoveFromRangeStart))> _
<ChildElementInfoAttribute(GetType(CustomXmlMoveFromRangeEnd))> _
<ChildElementInfoAttribute(GetType(CustomXmlMoveToRangeStart))> _
<ChildElementInfoAttribute(GetType(CustomXmlMoveToRangeEnd))> _
<ChildElementInfoAttribute(GetType(CustomXmlConflictInsertionRangeStart), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(CustomXmlConflictInsertionRangeEnd), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(CustomXmlConflictDeletionRangeStart), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(CustomXmlConflictDeletionRangeEnd), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(InsertedRun))> _
<ChildElementInfoAttribute(GetType(MoveFromRun))> _
<ChildElementInfoAttribute(GetType(MoveToRun))> _
<ChildElementInfoAttribute(GetType(ContentPart), FileFormatVersions.Office2010)> _
Public Class TableRow _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TableRow
[ChildElementInfoAttribute(typeof(DeletedRun))]
[ChildElementInfoAttribute(typeof(RunConflictInsertion), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(RunConflictDeletion), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(TablePropertyExceptions))]
[ChildElementInfoAttribute(typeof(TableRowProperties))]
[ChildElementInfoAttribute(typeof(TableCell))]
[ChildElementInfoAttribute(typeof(CustomXmlCell))]
[ChildElementInfoAttribute(typeof(SdtCell))]
[ChildElementInfoAttribute(typeof(ProofError))]
[ChildElementInfoAttribute(typeof(PermStart))]
[ChildElementInfoAttribute(typeof(PermEnd))]
[ChildElementInfoAttribute(typeof(BookmarkStart))]
[ChildElementInfoAttribute(typeof(BookmarkEnd))]
[ChildElementInfoAttribute(typeof(CommentRangeStart))]
[ChildElementInfoAttribute(typeof(CommentRangeEnd))]
[ChildElementInfoAttribute(typeof(MoveFromRangeStart))]
[ChildElementInfoAttribute(typeof(MoveFromRangeEnd))]
[ChildElementInfoAttribute(typeof(MoveToRangeStart))]
[ChildElementInfoAttribute(typeof(MoveToRangeEnd))]
[ChildElementInfoAttribute(typeof(CustomXmlInsRangeStart))]
[ChildElementInfoAttribute(typeof(CustomXmlInsRangeEnd))]
[ChildElementInfoAttribute(typeof(CustomXmlDelRangeStart))]
[ChildElementInfoAttribute(typeof(CustomXmlDelRangeEnd))]
[ChildElementInfoAttribute(typeof(CustomXmlMoveFromRangeStart))]
[ChildElementInfoAttribute(typeof(CustomXmlMoveFromRangeEnd))]
[ChildElementInfoAttribute(typeof(CustomXmlMoveToRangeStart))]
[ChildElementInfoAttribute(typeof(CustomXmlMoveToRangeEnd))]
[ChildElementInfoAttribute(typeof(CustomXmlConflictInsertionRangeStart), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CustomXmlConflictInsertionRangeEnd), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CustomXmlConflictDeletionRangeStart), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CustomXmlConflictDeletionRangeEnd), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(InsertedRun))]
[ChildElementInfoAttribute(typeof(MoveFromRun))]
[ChildElementInfoAttribute(typeof(MoveToRun))]
[ChildElementInfoAttribute(typeof(ContentPart), FileFormatVersions.Office2010)]
public class TableRow : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • TablePropertyExceptions <w:tblPrEx>

  • TableRowProperties <w:trPr>

  • TableCell <w:tc>

  • CustomXmlCell <w:customXml>

  • SdtCell <w:sdt>

  • ProofError <w:proofErr>

  • PermStart <w:permStart>

  • PermEnd <w:permEnd>

  • BookmarkStart <w:bookmarkStart>

  • BookmarkEnd <w:bookmarkEnd>

  • CommentRangeStart <w:commentRangeStart>

  • CommentRangeEnd <w:commentRangeEnd>

  • MoveFromRangeStart <w:moveFromRangeStart>

  • MoveFromRangeEnd <w:moveFromRangeEnd>

  • MoveToRangeStart <w:moveToRangeStart>

  • MoveToRangeEnd <w:moveToRangeEnd>

  • CustomXmlInsRangeStart <w:customXmlInsRangeStart>

  • CustomXmlInsRangeEnd <w:customXmlInsRangeEnd>

  • CustomXmlDelRangeStart <w:customXmlDelRangeStart>

  • CustomXmlDelRangeEnd <w:customXmlDelRangeEnd>

  • CustomXmlMoveFromRangeStart <w:customXmlMoveFromRangeStart>

  • CustomXmlMoveFromRangeEnd <w:customXmlMoveFromRangeEnd>

  • CustomXmlMoveToRangeStart <w:customXmlMoveToRangeStart>

  • CustomXmlMoveToRangeEnd <w:customXmlMoveToRangeEnd>

  • DocumentFormat.OpenXml.Office2010.Word.CustomXmlConflictInsertionRangeStart <w14:customXmlConflictInsRangeStart>

  • DocumentFormat.OpenXml.Office2010.Word.CustomXmlConflictInsertionRangeEnd <w14:customXmlConflictInsRangeEnd>

  • DocumentFormat.OpenXml.Office2010.Word.CustomXmlConflictDeletionRangeStart <w14:customXmlConflictDelRangeStart>

  • DocumentFormat.OpenXml.Office2010.Word.CustomXmlConflictDeletionRangeEnd <w14:customXmlConflictDelRangeEnd>

  • InsertedRun <w:ins>

  • DeletedRun <w:del>

  • MoveFromRun <w:moveFrom>

  • MoveToRun <w:moveTo>

  • ContentPart <w:contentPart>

  • DocumentFormat.OpenXml.Office2010.Word.RunConflictInsertion <w14:conflictIns>

  • DocumentFormat.OpenXml.Office2010.Word.RunConflictDeletion <w14:conflictDel>

[ISO/IEC 29500-1 1st Edition]

17.4.79 tr (Table Row)

This element specifies a single table row, which contains the table’s cells. Table rows in WordprocessingML are analogous to HTML tr elements.

A tr element has one formatting child element, trPr (§17.4.82), which defines the properties for the row. Each unique property on the table row is specified by a child element of this element. As well, a table row can contain any row-level content, which allows for the use of table cells.

If a table cell does not include at least one child element other than the row properties, then this document shall be considered corrupt.

[Example: Consider a table consisting of a single table cell, which contains the text Hello World:

Hello World

This table row's content is represented by the following WordprocessingML:

<w:tr>
<w:tc>
<w:tcPr>
<w:tcW w:w="0" w:type="auto"/>
</w:tcPr>
<w:p>
<w:r>
<w:t>Hello, World</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>

The tr element contains a single row-level element - in this case, a table cell. end example]

Parent Elements

customXml (§17.5.1.5); sdtContent (§17.5.2.35); tbl (§17.4.38)

Child Elements

Subclause

bookmarkEnd (Bookmark End)

§17.13.6.1

bookmarkStart (Bookmark Start)

§17.13.6.2

commentRangeEnd (Comment Anchor Range End)

§17.13.4.3

commentRangeStart (Comment Anchor Range Start)

§17.13.4.4

customXml (Cell-Level Custom XML Element)

§17.5.1.4

customXmlDelRangeEnd (Custom XML Markup Deletion End)

§17.13.5.4

customXmlDelRangeStart (Custom XML Markup Deletion Start)

§17.13.5.5

customXmlInsRangeEnd (Custom XML Markup Insertion End)

§17.13.5.6

customXmlInsRangeStart (Custom XML Markup Insertion Start)

§17.13.5.7

customXmlMoveFromRangeEnd (Custom XML Markup Move Source End)

§17.13.5.8

customXmlMoveFromRangeStart (Custom XML Markup Move Source Start)

§17.13.5.9

customXmlMoveToRangeEnd (Custom XML Markup Move Destination Location End)

§17.13.5.10

customXmlMoveToRangeStart (Custom XML Markup Move Destination Location Start)

§17.13.5.11

del (Deleted Run Content)

§17.13.5.14

ins (Inserted Run Content)

§17.13.5.18

moveFrom (Move Source Run Content)

§17.13.5.22

moveFromRangeEnd (Move Source Location Container - End)

§17.13.5.23

moveFromRangeStart (Move Source Location Container - Start)

§17.13.5.24

moveTo (Move Destination Run Content)

§17.13.5.25

moveToRangeEnd (Move Destination Location Container - End)

§17.13.5.27

moveToRangeStart (Move Destination Location Container - Start)

§17.13.5.28

oMath (Office Math)

§22.1.2.77

oMathPara (Office Math Paragraph)

§22.1.2.78

permEnd (Range Permission End)

§17.13.7.1

permStart (Range Permission Start)

§17.13.7.2

proofErr (Proofing Error Anchor)

§17.13.8.1

sdt (Cell-Level Structured Document Tag)

§17.5.2.32

tblPrEx (Table-Level Property Exceptions)

§17.4.61

tc (Table Cell)

§17.4.66

trPr (Table Row Properties)

§17.4.82

Attributes

Description

rsidDel (Revision Identifier for Table Row Deletion)

Specifies a unique identifier used to track the editing session when the row was deleted from the main document.

All rsid* attributes throughout this document with the same value, if present, shall indicate that those regions were modified during the same editing session (time between subsequent save actions).

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions to indicate the order of the modifications relative to other modifications in this document.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

rsidR (Revision Identifier for Table Row)

Specifies a unique identifier used to track the editing session when the table row was added to the main document.

All rsid* attributes throughout this document with the same value, if present, shall indicate that those regions were modified during the same editing session (time between subsequent save actions).

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions to indicate the order of the modifications relative to other modifications in this document.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

rsidRPr (Revision Identifier for Table Row Glyph Formatting)

Specifies a unique identifier used to track the editing session when the glyph character representing the table row mark was last modified in the main document.

All rsid* attributes throughout this document with the same value, if present, shall indicate that those regions were modified during the same editing session (time between subsequent save actions).

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions to indicate the order of the modifications relative to other modifications in this document.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

rsidTr (Revision Identifier for Table Row Properties)

Specifies a unique identifier used to track the editing session when the table row's properties were last modified in this document.

All rsid* attributes throughout this document with the same value, if present, shall indicate that those regions were modified during the same editing session (time between subsequent save actions).

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions to indicate the order of the modifications relative to other modifications in this document.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

[Note: The W3C XML Schema definition of this element’s content model (CT_Row) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

TableRow Members

DocumentFormat.OpenXml.Wordprocessing Namespace