Skip to main content
All docs
V24.2

DxPivotTableField.Width Property

Specifies the width of cells where the field values are displayed.

Namespace: DevExpress.Blazor.PivotTable

Assembly: DevExpress.Blazor.PivotTable.v24.2.dll

NuGet Package: DevExpress.Blazor.PivotTable

Declaration

[DefaultValue(0)]
[Parameter]
public int Width { get; set; }

Property Value

Type Default Description
Int32 0

The cell width in pixels.

Remarks

The control applies the following default widths to cells:

  • Row fields, row totals, row grand totals: 200 pixels.
  • Data fields, corresponding column fields, column totals, column grand totals: 100 pixels.

Use the Width property to set cell widths for fields. The Width property behavior depends on the area where the field is located:

  • Row fields: The property sets header cell width.
  • Data fields: The property sets data cell width.
  • Column fields: If the Pivot Table does not have data fields, the property sets to column header width. Otherwise, the property has no effect.
<DxPivotTable Data="SalesData">
    <Fields>
        <DxPivotTableField Field="@nameof(SaleInfo.Region)"
                           Area="@PivotTableArea.Row"
                           AreaIndex="0" 
                           Width="100"/>
        <DxPivotTableField Field="@nameof(Sales.SaleInfo.Amount)"
                           SortOrder="@PivotTableSortOrder.Ascending"
                           Area="@PivotTableArea.Data"
                           SummaryType="@PivotTableSummaryType.Sum" 
                           Width="80"/>
        @*...*@
    </Fields>
</DxPivotTable>

Implements

See Also