Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

C#
[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.
Razor
<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