Class SfPivotFieldList<TValue>
PivotFieldlist JS interop adaptor.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.PivotView
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfPivotFieldList<TValue> : SfDataBoundComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IPivotFieldList
Type Parameters
| Name | Description |
|---|---|
| TValue | A type which provides schema for the pivot component. |
Constructors
SfPivotFieldList()
Declaration
public SfPivotFieldList()
Properties
AggregateTypes
Allows you to show a menu with built-in aggregate options displayed in the pivot button's dropdown icon of fieldList UI. These aggregate options help to display the values in the pivot table with appropriate aggregations such as sum, product, count, average, etc… easily at runtime.
Declaration
[Parameter]
[JsonPropertyName("aggregateTypes")]
public List<AggregateTypes> AggregateTypes { get; set; }
Property Value
| Type | Description |
|---|---|
| List<AggregateTypes> | A list of AggregateTypes instances. |
AllowCalculatedField
Gets or sets a value indicating whether the built-in calculated field dialog can be displayed in the component.
Declaration
[Parameter]
[JsonPropertyName("allowCalculatedField")]
public bool AllowCalculatedField { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
You can view the calculated field dialog by clicking the "Calculated Field" button in the field list UI. This dialog will helps you to create a new calculated field in the pivot table, based on available fields from the bound data source or using simple formula with basic arithmetic operators at runtime.
AllowDeferLayoutUpdate
Gets or sets a value indicating whether the pivot table component should be updated only on demand. This means that you can perform a variety of operations such as drag-and-drop fields between row, column, value and filter axes, apply sorting and filtering inside the Field List, resulting the field list UI would be updated on its own, but not the pivot table. On clicking the “Apply†button in the Field List, the pivot table will updates the last modified report. This helps to improve the performance of the pivot table component rendering.
Declaration
[Parameter]
[JsonPropertyName("allowDeferLayoutUpdate")]
public bool AllowDeferLayoutUpdate { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
CssClass
Allows you to add the CSS class name to the field list element. Use this class name, you can customize the field list easily at your end.
Declaration
[Parameter]
[JsonPropertyName("cssClass")]
public string CssClass { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accepts the string value. |
DataSourceSettings
Gets or sets the following pivot report information such as rows, columns, values, filters, etc., that are used to render the pivot table and field list.
Declaration
[Parameter]
[JsonPropertyName("dataSourceSettings")]
public IPivotFieldListDataSourceSettings DataSourceSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| IPivotFieldListDataSourceSettings | An instance of IPivotFieldListDataSourceSettings |
ElementAttributes
Catches unmatched attributes from the component. This can be used to specify custom style, class and other attributes to the pivot table.
Declaration
[Parameter(CaptureUnmatchedValues = true)]
public IDictionary<string, object> ElementAttributes { get; set; }
Property Value
| Type |
|---|
| IDictionary<string, object> |
EnablePersistence
Gets or sets a value that indicates whether to enable or disable persisting component's state between page reloads.
Declaration
[Parameter]
public bool EnablePersistence { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
[Parameter]
[JsonPropertyName("enableRtl")]
public bool EnableRtl { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
ID
Gets or sets the ID for PivotFieldList component.
Declaration
[Parameter]
public string ID { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accepts the string value. |
LoadOnDemandInMemberEditor
Gets or sets a boolean value indicating whether to load members inside the member filter dialog on-demand. The first level members will be loaded from the OLAP cube to display the member editor by default. As a result, the member editor will open quickly without any performance constraints.
Declaration
[Parameter]
[JsonPropertyName("loadOnDemandInMemberEditor")]
public bool LoadOnDemandInMemberEditor { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
You can use either of the following actions to load your next level members. The actions are:
- By clicking on the respective member's expander button. By doing so, only the child members of the respective member will be loaded.
- By choosing the level from the drop-down button. By doing so, all the members up to the level chosen will be loaded from the cube.
MaxNodeLimitInMemberEditor
Gets or sets the limit for displaying members while loading large data in the member filter dialog. Based on this limit, initial loading will be completed quickly without any performance constraint. A message with remaining member count, that are not currently shown in the member filter dialog UI, will be displayed in the member editor.
Declaration
[Parameter]
[JsonPropertyName("maxNodeLimitInMemberEditor")]
public int MaxNodeLimitInMemberEditor { get; set; }
Property Value
| Type | Description |
|---|---|
| int | Accepts an integer value. The default value is |
Remarks
This property is not applicable to user-defined hierarchies in the OLAP data source.
RenderMode
Declaration
[Parameter]
[JsonPropertyName("renderMode")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public Mode RenderMode { get; set; }
Property Value
| Type | Description |
|---|---|
| Mode | The default value is Popup. |
Remarks
The available modes are:
ShowFieldSearch
Gets or sets a value indicating whether the field search bar is enabled in the field list to search for fields.
Declaration
[Parameter]
[JsonPropertyName("showFieldSearch")]
public bool ShowFieldSearch { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
Use this property to control the visibility of the field search bar in the field list.
When set to true, the field search bar will be shown, allowing users to search for fields.
When set to false, the field search bar will be hidden.
ShowValuesButton
Gets or sets a value indicating whether to create a pivot button with "Values" as a caption. This pivot button is displayed in the grouping bar and field list UI. It helps you to plot the value fields to either column or row axis during runtime.
Declaration
[Parameter]
[JsonPropertyName("showValuesButton")]
public bool ShowValuesButton { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
The ShowValuesButton property is enabled by default for the OLAP data source. And the pivot button can be displayed with "Measures" as a caption used to display in the grouping bar and field list UI.
Target
Gets or sets the specific target element for the field list dialog. This helps the field list dialog to display the appropriate position on its target element.
Declaration
[Parameter]
[JsonPropertyName("target")]
public string Target { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Accepts an string value. |
Remarks
To use this option, set the property RenderMode to be Popup.
ijsRuntime
Declaration
[Inject]
protected IJSRuntime ijsRuntime { get; set; }
Property Value
| Type |
|---|
| IJSRuntime |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
GetPersistDataAsync()
Get the Pivot widget properties to be maintained in the persisted state.
Declaration
public Task<string> GetPersistDataAsync()
Returns
| Type | Description |
|---|---|
| Task<string> | void. |
LoadPersistDataAsync(string)
Loads pivot layout.
Declaration
public Task LoadPersistDataAsync(string persistData)
Parameters
| Type | Name | Description |
|---|---|---|
| string | persistData | Local report from browser storage. |
Returns
| Type | Description |
|---|---|
| Task | void. |
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
ResetPersistDataAsync()
Resets the state of the pivot table.
Declaration
public Task ResetPersistDataAsync()
Returns
| Type | Description |
|---|---|
| Task | void. |
Remarks
This method will clear the current state and refreshes the pivot table with original state given delcaratively. If EnablePersistence is used then this will clear the state which is stored in window.localStorage too.
ShouldRender()
Declaration
protected override bool ShouldRender()
Returns
| Type |
|---|
| bool |
Overrides
ShowFieldListDialogAsync()
This method opens the field list dialog programmatically. You can use this dialog to add or remove fields, as well as rearrange them between different axes, such as column, row, value, and filter, as well as sort and filter options dynamically at runtime. In addition, by enabling the AllowDeferLayoutUpdate property, you can perform all UI actions within the field list UI, resulting in a change in the pivot report but not in the pivot table UI. When you click the "Apply" button in the field list UI, the pivot table will begin to update with the most recently modified report. This improves better performance in pivot table component rendering.
This option is only available when the RenderMode property is set to Mode.Popup.
Declaration
public Task ShowFieldListDialogAsync()
Returns
| Type | Description |
|---|---|
| Task | void. |
Examples
<SfPivotFieldList TValue="ProductDetails" ID="fieldlist" @ref="fieldList" RenderMode="Mode.Popup" >
</SfPivotFieldList>
<SfButton CssClass="fieldlist-button" IsPrimary="true" OnClick="@OnClick">FieldList</SfButton>
@code {
public async Task OnClick(Microsoft.AspNetCore.Components.Web.MouseEventArgs arg)
{
if(this.fieldList != null)
{
await this.fieldList.ShowFieldListDialogAsync();
}
}
}
UpdateAsync(SfPivotView<TValue>)
Updates the PivotFieldList component using dataSource from PivotView component.
Declaration
public Task UpdateAsync(SfPivotView<TValue> control)
Parameters
| Type | Name | Description |
|---|---|---|
| SfPivotView<TValue> | control | PivotView control to update Fieldlist. |
Returns
| Type | Description |
|---|---|
| Task | void. |
UpdateViewAsync(SfPivotView<TValue>)
Updates the PivotView component using dataSource from Pivot FieldList component.
Declaration
public Task UpdateViewAsync(SfPivotView<TValue> control)
Parameters
| Type | Name | Description |
|---|---|---|
| SfPivotView<TValue> | control | PivotView control to update Table. |
Returns
| Type | Description |
|---|---|
| Task | void. |