Search results

Improve filter dialog performance when handling large data

In the filter dialog, you can set the limit to display the field values while loading large data. Based on this limit, the initial loading will complete quickly without any performance constraint. You can use the search option to refine the field values from the exceeded limit and refine the data further. A message with the remaining data count will be displayed in the member editor. The data limit can be set in the maxNodeLimitInEditor property.

By default, the property holds the value 1000.

The property is available in both Pivot Grid and Field List components.

In the following example, the limit of data in the member editor is set to 100. So, the member editor of the ProductID field shows only its first 100 members from its 1000 members.

import { Component } from '@angular/core';
import { IDataOptions, PivotView, GroupingBarService, FieldListService } from '@syncfusion/ej2-angular-pivotview';
import { Pivot_Data } from './datasource.ts';

  selector: 'app-container',
  providers: [GroupingBarService, FieldListService],
  // specifies the template string for the Pivot Grid component
  template: `<ejs-pivotview #pivotview id='PivotView' [dataSource]=dataSource showGroupingBar='true' width=width maxNodeLimitInEditor=maxNodeLimitInEditor showFieldList='true'></ejs-pivotview>`

export class AppComponent {

    public width: string;
    public dataSource: IDataOptions;
    public maxNodeLimitInEditor: number;

    ngOnInit(): void {

        this.width = "100%";
        this.maxNodeLimitInEditor= 5

        this.dataSource = {
            data: Pivot_Data,
            expandAll: false,
            enableSorting: true,
            columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
            values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }],
            rows: [{ name: 'Country' }, { name: 'Products' }],
            formatSettings: [{ name: 'Amount', format: 'C0' }],
            filters: []
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { PivotViewAllModule, PivotFieldListAllModule } from '@syncfusion/ej2-angular-pivotview';
import { AppComponent } from './app.component';

 * Module
    imports: [
    declarations: [AppComponent],
    bootstrap: [AppComponent]
export class AppModule { }