Share via


GridColumn.Width Property

Grid Column Width.Represents the attribte in schema: w:w

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

Syntax

'Declaration
<SchemaAttrAttribute(, "w")> _
Public Property Width As StringValue
    Get
    Set
'Usage
Dim instance As GridColumn
Dim value As StringValue

value = instance.Width

instance.Width = value
[SchemaAttrAttribute(, "w")]
public StringValue Width { get; set; }

Property Value

Type: DocumentFormat.OpenXml.StringValue
Returns UInt64Value.

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

Specifies the width of this grid column.

This value does not solely determine the actual width of the resulting grid column in the document. When the table is displayed in a document, these widths determine the initial width of each grid column, which may then be overridden by:

  • The table layout algorithm applied to the current table row(s)

  • The preferred widths of specific cells which are part of that grid column as the table is displayed (which is an input to the algorithm above)

This value is specified in twentieths of a point.

If this attribute is omitted, then the last saved width of the grid column is assumed to be zero.

Consider the following table grid definition:

<w:tblGrid>
  <w:gridCol w:w="6888"/>
  <w:gridCol w:w="248"/>
  <w:gridCol w:w="886"/>
  <w:gridCol w:w="1554"/>
</w:tblGrid>

This table grid specifies four grid columns, each of which has an initial size of 6888 twentieths of a point, 248 twentieths of a point, 886 twentieths of a point, and 1554 twentieths of a point respectively.

The possible values for this attribute are defined by the ST_TwipsMeasure simple type.

See Also

Reference

GridColumn Class

GridColumn Members

DocumentFormat.OpenXml.Wordprocessing Namespace