Back to Devexpress

DxPivotTableField.Width Property

blazor-devexpress-dot-blazor-dot-pivottable-dot-dxpivottablefield-600906ac.md

latest2.2 KB
Original Source

DxPivotTableField.Width Property

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

Namespace : DevExpress.Blazor.PivotTable

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

NuGet Package : DevExpress.Blazor.PivotTable

Declaration

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

Property Value

TypeDefaultDescription
Int320

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(Sales.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

Width

See Also

DxPivotTableField Class

DxPivotTableField Members

DevExpress.Blazor.PivotTable Namespace