Share via


GridColumn.Width Property

Definition

Grid Column Width

Represents the following attribute in the schema: w:w

[DocumentFormat.OpenXml.SchemaAttr(23, "w")]
public DocumentFormat.OpenXml.StringValue Width { get; set; }
public DocumentFormat.OpenXml.StringValue Width { get; set; }
[DocumentFormat.OpenXml.SchemaAttr(23, "w")]
public DocumentFormat.OpenXml.StringValue? Width { get; set; }
[DocumentFormat.OpenXml.SchemaAttr("w:w")]
public DocumentFormat.OpenXml.StringValue? Width { get; set; }
public DocumentFormat.OpenXml.StringValue? Width { get; set; }
member this.Width : DocumentFormat.OpenXml.StringValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr(23, "w")>]
member this.Width : DocumentFormat.OpenXml.StringValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr("w:w")>]
member this.Width : DocumentFormat.OpenXml.StringValue with get, set
Public Property Width As StringValue

Property Value

Returns UInt64Value.

Attributes

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.

Applies to