DxPivotTable.ShowFieldList(DialogDisplayOptions) Method
Displays the Field List and positions it based on specified display options.
Namespace: DevExpress.Blazor.PivotTable
Assembly: DevExpress.Blazor.PivotTable.v25.1.dll
NuGet Package: DevExpress.Blazor.PivotTable
Declaration
public void ShowFieldList(
DialogDisplayOptions dialogOptions
)
Parameters
Name | Type | Description |
---|---|---|
dialogOptions | DialogDisplayOptions | An object that contains the Field List’s display options. |
Remarks
The Pivot Table includes a Field List that allows users to manage component structure:
- Reorder fields within each area. This action modifies a field’s AreaIndex property value.
- Move fields across different areas. This action modifies a field’s Area property value.
- Display or hide fields. The Hidden Fields list shows hidden fields. To display a field, users must drag the field to the desired area’s field list. This action modifies a field’s Visible property value.
- Change field sort order. When a user hovers the mouse pointer over a field name in the list, the sort glyph appears next to the field name. A user can click the glyph to change the sort order. The sort glyph and the filter menu button remain visible when users change the sort order or applies filters in the component or Field List. If a user resets the sort order and filters to their default state, the glyph and button disappear.
- Apply field filters. When a user hovers a mouse pointer over a field name in the list, the filter menu button
appears next to the field name. This button invokes the Filter Menu that allows users to select or clear the desired field values. The sort glyph and the filter menu button remain visible if a user changed the sort order or applies filters in the component or Field List. If a user resets the sort order and filters to their default state, the glyph and button disappear.
- Defer layout update. When the corresponding checkbox is enabled, the Pivot Table layout is not updated after each customization. Instead, changes are applied only when the user clicks the Update button.
To display the Field List, call the ShowFieldList() or ShowFieldList(DialogDisplayOptions)
method. The following code invokes the Field List at the target point:
@rendermode InteractiveServer
<DxButton Text="Show Field List" Click="OnShowFieldList"/>
<DxPivotTable Data="SalesData" @ref=MyPivotTable>
<Fields>
<DxPivotTableField Field="@nameof(Sales.SaleInfo.Region)"
Area="@PivotTableArea.Row"
AreaIndex="0" />
<DxPivotTableField Field="@nameof(Sales.SaleInfo.Country)"
Area="@PivotTableArea.Row"
SortOrder="@PivotTableSortOrder.Descending"
AreaIndex="1" />
<DxPivotTableField Field="@nameof(Sales.SaleInfo.Date)"
GroupInterval="@PivotTableGroupInterval.DateYear"
Area="@PivotTableArea.Column"
AreaIndex="0"
Caption="Year" />
<DxPivotTableField Field="@nameof(Sales.SaleInfo.Date)"
GroupInterval="@PivotTableGroupInterval.DateQuarter"
Area="@PivotTableArea.Column"
AreaIndex="1"
Caption="Quarter" />
<DxPivotTableField Field="@nameof(Sales.SaleInfo.Amount)"
SortOrder="@PivotTableSortOrder.Ascending"
Area="@PivotTableArea.Data"
SummaryType="@PivotTableSummaryType.Sum" />
<DxPivotTableField Field="@nameof(Sales.SaleInfo.City)"
Area="@PivotTableArea.Filter"/>
</Fields>
</DxPivotTable>
@code {
IPivotTable MyPivotTable { get; set; }
IEnumerable<Sales.SaleInfo> SalesData;
protected override async Task OnInitializedAsync() {
SalesData = await Sales.GetSalesAsync();
}
void OnShowFieldList() {
MyPivotTable.ShowFieldList(new DialogDisplayOptions(new System.Drawing.Point(100, 100)));
}
}
Implements
See Also