GridSpan Class
Defines the GridSpan Class.When the object is serialized out as xml, its qualified name is w:gridSpan.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.DecimalNumberType
DocumentFormat.OpenXml.Wordprocessing.GridSpan
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
声明
Public Class GridSpan _
Inherits DecimalNumberType
用法
Dim instance As GridSpan
public class GridSpan : DecimalNumberType
Remarks
[ISO/IEC 29500-1 第 1 个版本]
17.4.17 gridSpan (Grid Columns Spanned by Current Table Cell)
This element specifies the number of grid columns in the parent table's table grid which shall be spanned by the current cell. This property allows cells to have the appearance of being merged, as they span vertical boundaries of other cells in the table.
If this element is omitted, then the number of grid units spanned by this cell shall be assumed to be one. If the number of grid units specified by the val attribute exceeds the size of the table grid, then the table grid shall be augmented as needed to create the number of grid columns required.
[Example: Consider the following table that has two rows and two columns where the columns are not aligned:
This table is represented by laying out the cells on a table grid consisting of three table grid columns, each grid column representing a logical vertical column in the table:
The first table cell in the first row spans two grid column units. The second cell in the second row also consumes two grid column units (see the grid lines represented using dotted lines in the example above). This table is represented using the following WordprocessingML:
<w:tbl>
…
<w:tr>
<w:tc>
<w:tcPr>
…
<w:gridSpan w:val="2" />
</w:tcPr>
…
</w:tc>
…
</w:tr>
<w:tr>
<w:tc>
…
</w:tc>
<w:tc>
<w:tcPr>
…
<w:gridSpan w:val="2" />
</w:tcPr>
…
</w:tc>
</w:tr>
</w:tbl>
The gridSpan element indicates the number of columns spanned by each cell with respect to the table grid (in the case of R1C1 and TR2C2, two. end example]
Parent Elements |
---|
tcPr (§17.7.6.8); tcPr (§17.7.6.9); tcPr (§17.4.70); tcPr (§17.4.71) |
Attributes |
Description |
---|---|
val (Decimal Number Value) |
Specifies that the contents of this attribute contains a decimal number. The contents of this decimal number are interpreted based on the context of the parent XML element. [Example: Consider the following numeric WordprocessingML property of simple type ST_DecimalNumber:
The value of the val attribute is a decimal number whose value must be interpreted in the context of the parent element. end example] The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10). |
[Note: The W3C XML Schema definition of this element's content model (CT_DecimalNumber) is located in §A.1. end note]
© ISO/IEC29500: 2008. 以上摘要已经由 Microsoft(和/或其代理公司)从英语翻译为简体中文,ISO 对此翻译不承担任何责任。
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.