Class SfPivotFieldList<TValue>
PivotFieldlist JS interop adaptor.
Implements
Inherited Members
Namespace: Syncfusion.Blazor.PivotView
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfPivotFieldList<TValue> : SfDataBoundComponent, IPivotFieldList, ISfCircularComponent
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
public List<AggregateTypes> AggregateTypes { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.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
public bool AllowCalculatedField { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
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
public bool AllowDeferLayoutUpdate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
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
public string CssClass { get; set; }
Property Value
| Type | Description |
|---|---|
| System.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
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
public IDictionary<string, object> ElementAttributes { get; set; }
Property Value
| Type |
|---|
| System.Collections.Generic.IDictionary<System.String, System.Object> |
EnablePersistence
Gets or sets a value that indicates whether to enable or disable persisting component's state between page reloads.
Declaration
public bool EnablePersistence { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
ID
Gets or sets the ID for PivotFieldList component.
Declaration
public string ID { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | Accepts the string value. |
ijsRuntime
Declaration
protected IJSRuntime ijsRuntime { get; set; }
Property Value
| Type |
|---|
| Microsoft.JSInterop.IJSRuntime |
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
public bool LoadOnDemandInMemberEditor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
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
public int MaxNodeLimitInMemberEditor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | 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
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
public bool ShowFieldSearch { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
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
public bool ShowValuesButton { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
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
public string Target { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | Accepts an string value. |
Remarks
To use this option, set the property RenderMode to be Popup.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
GetPersistDataAsync()
Get the Pivot widget properties to be maintained in the persisted state.
Declaration
public Task<string> GetPersistDataAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | void. |
LoadPersistDataAsync(String)
Loads pivot layout.
Declaration
public Task LoadPersistDataAsync(string persistData)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | persistData | Local report from browser storage. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | void. |
OnFieldDropped(String, String, String, Boolean, String)
Method invokes on Field drop.
Declaration
public Task OnFieldDropped(string target, string dropTarget, string element, bool cancel, string fieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | target | Target element of the name. |
| System.String | dropTarget | Part of the name. |
| System.String | element | Dom elemet. |
| System.Boolean | cancel | To restrict drag and drop. |
| System.String | fieldName | Fieldname for element dropped. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.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 |
|---|---|
| System.Threading.Tasks.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 |
|---|---|
| System.Threading.Tasks.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 |
|---|---|
| System.Threading.Tasks.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 |
|---|
| System.Boolean |
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 |
|---|---|
| System.Threading.Tasks.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();
}
}
}
TriggerNodeDraggingEvent(String)
Method invokes on Field drag start.
Declaration
public Task<FieldDragStartEventArgs> TriggerNodeDraggingEvent(string fieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fieldName | FieldName of the drag element. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<FieldDragStartEventArgs> | FieldDragStartEventArgs. |
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 |
|---|---|
| System.Threading.Tasks.Task | void. |
UpdateCalcDroppable(String, Int32, String)
Method invokes on Field drop in Calculated Field Dialog.
Declaration
public void UpdateCalcDroppable(string nodeId, int cursorPos, string targetId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | nodeId | Node Id of field. |
| System.Int32 | cursorPos | Cursor position. |
| System.String | targetId | Target ID. |
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 |
|---|---|
| System.Threading.Tasks.Task | void. |
Explicit Interface Implementations
IPivotFieldList.PivotFieldListTemplates
Declaration
PivotFieldListTemplates IPivotFieldList.PivotFieldListTemplates { get; set; }
Returns
| Type |
|---|
| PivotFieldListTemplates |