Skip to main content
A newer version of this page is available. .
Tag

PivotGridFieldBase.Width Property

Gets or sets the width of columns that correspond to the current field.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v19.2.Core.dll

Declaration

[DefaultValue(100)]
public virtual int Width { get; set; }

Property Value

Type Default Description
Int32 100

An integer value specifying the width of columns that correspond to the current field.

Remarks

The Width property effect depends on the area where the current field is located.

  • For column fields, the Width property specifies the width of columns that correspond to that field. If field value cells of the current field have nested cells, the Width property is not in effect.
  • For row fields, the Width property specifies the width of a column that contains values of the current field.
  • For data fields, the Width property effect depends on where data field headers are displayed (defined by the PivotGridOptionsDataField.Area property). If the current field is the only field in the Data Area, and data field headers are not displayed, the Width property is not in effect.

    • If data field headers are displayed as column headers, the Width property specifies the width of corresponding pivot grid columns. If data field headers have nested cells, the Width property is not in effect.
    • If data field headers are displayed as row headers, the Width property is not in effect. In this instance, use the PivotGridOptionsDataField.RowHeaderWidth property to specify the width of data field headers.

The PivotGridFieldBase.MinWidth property defines the minimum possible width for the column. If the Width property value is less than this value, it is automatically changed to PivotGridFieldBase.MinWidth.

To denote a default value of the Width property, use the PivotGridFieldBase.DefaultWidth field.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Width property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also