WordTableRow
OfficeIMO.Word
Represents a row within a WordTable and exposes row level operations.
Inheritance
- object
- WordTableRow
Usage
Explore 20 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 8
- Method WordTable.AddRow
- Method WordTable.AddRows
- Method WordTable.CopyRow
- Method WordTable.InsertRow
- Property WordTable.FirstRow
- Property WordTable.LastRow
- Property WordTable.Rows
- Property WordTableCell.Parent
Accepted by parameters 12
- Method WordTable.ConditionalFormatting
- Method WordTable.ConditionalFormatting
- Method WordTable.ConditionalFormatting
- Method WordTable.CopyRow
- Method WordTableConditionalFormattingBuilder.AddRule
- Method WordTableConditionalFormattingBuilder.AddRule
- Method WordTableConditionalFormattingBuilder.AddRule
- Method WordTableRow.Equals
- Method WordTableRow.op_Equality
- Method WordTableRow.op_Equality
- Method WordTableRow.op_Inequality
- Method WordTableRow.op_Inequality
Constructors
public WordTableRow(WordDocument document, WordTable wordTable) #Initializes a new instance of the WordTableRow class and creates an empty row.
Parameters
- document OfficeIMO.Word.WordDocument
- The parent WordDocument.
- wordTable OfficeIMO.Word.WordTable
- The table to which this row belongs.
Methods
public WordTableCell AddCell() #Creates and appends a cell, returning the attached cell for further editing.
Returns
WordTableCellpublic bool Equals(WordTableRow? other) #Determines whether this instance and another row reference the same underlying OpenXML row.
Parameters
- other OfficeIMO.Word.WordTableRow?
Returns
boolpublic override bool Equals(object? obj) #Determines whether the specified object is equal to the current object.
Parameters
- obj object?
- The object to compare with the current object.
Returns
bool true if the specified object is equal to the current object; otherwise, false.public List<WordTableCell> GetCells(bool readOnly = false) #Returns cells for this row. When readOnly is true, wrappers are created without ensuring tcPr, avoiding DOM mutations on read.
Parameters
- readOnly bool = false
Returns
List<WordTableCell>public override int GetHashCode() #Serves as the default hash function.
Returns
int A hash code for the current object.public void MergeVertically(int cellIndex, int rowsCount, bool copyParagraphs = false) #Merges cells starting from the specified column across subsequent rows.
Parameters
- cellIndex int
- Column index of the first cell to merge.
- rowsCount int
- Number of rows below this one to merge.
- copyParagraphs bool = false
- True to move paragraphs from merged cells to the first cell; false to discard them.
public static bool op_Equality(WordTableRow? left, WordTableRow? right) #Compares two rows for equality based on the underlying OpenXML row reference.
Parameters
- left OfficeIMO.Word.WordTableRow?
- right OfficeIMO.Word.WordTableRow?
Returns
boolpublic static bool op_Inequality(WordTableRow? left, WordTableRow? right) #Determines whether two rows are not equal.
Parameters
- left OfficeIMO.Word.WordTableRow?
- right OfficeIMO.Word.WordTableRow?
Returns
boolInherited Methods
Properties
public List<WordTableCell> Cells { get; } #Gets the row's cells in document order, including cells inside content controls and custom XML.
public OfficeLength? Height { get; set; } #Gets the declared row height as a physical length, or sets an exact height. Null removes the height constraint.
public OfficeLength? MinimumHeight { get; set; } #Gets or sets the minimum row height as a physical length, allowing the row to grow to fit content. Setting a value replaces an exact height. Null removes a minimum constraint and preserves an exact height.
public bool AllowRowToBreakAcrossPages { get; set; } #Gets or sets a value indicating whether the row is allowed to break across pages. When set to false, the row is kept intact on a single page.
public bool RepeatHeaderRowAtTheTopOfEachPage { get; set; } #Gets or sets whether this table row should repeat at the top of each page. Word repeats contiguous header rows from the start of the table. Setting false explicitly overrides a repeating header inherited from a table style.