How to use the igniteui-angular.DefaultSortingStrategy.instance function in igniteui-angular

To help you get started, we’ve selected a few igniteui-angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IgniteUI / igniteui-angular-samples / src / app / grid / grid-save-state / state.directive.ts View on Github external
}

        // restore paging
        if (this.paging && this.gridState.paging) {
          if (this.grid.perPage !== this.gridState.paging.recordsPerPage) {
            this.grid.perPage = this.gridState.paging.recordsPerPage;
            this.grid.cdr.detectChanges();
          }
          if (this.grid.page !== this.gridState.paging.index) {
            this.grid.paginate(this.gridState.paging.index);
          }
        }

        // restore sorting
        if (this.sorting && this.gridState.sorting) {
          const strategy = DefaultSortingStrategy.instance();
          this.gridState.sorting.forEach((expr) => expr.strategy = strategy);
          this.grid.sortingExpressions = this.gridState.sorting;
        }

        // restore selection
        if (this.selection && this.gridState.selection) {
          this.grid.selectRows(this.gridState.selection);
        }
    }
github IgniteUI / igniteui-angular-samples / src / app / grid-finjs / grid-finjs-demo.component.ts View on Github external
public ngOnInit() {
        this.grid1.groupingExpressions = [{
            dir: SortingDirection.Desc,
            fieldName: "Category",
            ignoreCase: false,
            strategy: DefaultSortingStrategy.instance()
        },
        {
            dir: SortingDirection.Desc,
            fieldName: "Type",
            ignoreCase: false,
            strategy: DefaultSortingStrategy.instance()
        },
        {
            dir: SortingDirection.Desc,
            fieldName: "Contract",
            ignoreCase: false,
            strategy: DefaultSortingStrategy.instance()
        }
        ];
        this.volumeChanged = this.volumeSlider.onValueChange.pipe(debounce(() => timer(200)));
        this.volumeChanged.subscribe(
            (x) => {
                this.localService.getData(this.volume);
            },
            (err) => console.log("Error: " + err));
    }
github IgniteUI / igniteui-angular-samples / src / app / hierarchical-grid / hierarchical-grid-sorting / hierarchical-grid-sorting.component.ts View on Github external
public ngOnInit(): void {
        this.localdata = SINGERS;
        this.hierarchicalGrid.sortingExpressions = [
            { dir: SortingDirection.Asc, fieldName: "Artist",
              ignoreCase: true, strategy: DefaultSortingStrategy.instance() }
        ];
    }
    public ngAfterViewInit(): void {
github IgniteUI / igniteui-angular-samples / src / app / grid / grid-sorting-styling / grid-sorting-styling.component.ts View on Github external
public ngOnInit(): void {
        this.data = DATA;
        this.grid1.sortingExpressions = [
            {
                dir: SortingDirection.Asc, fieldName: "CategoryName",
                ignoreCase: true, strategy: DefaultSortingStrategy.instance()
            }
        ];
    }
github IgniteUI / igniteui-angular-samples / src / app / grid / grid-sorting-sample / grid-sorting-sample.component.ts View on Github external
public ngOnInit(): void {
        this.data = DATA;
        this.grid1.sortingExpressions = [
            {
                dir: SortingDirection.Asc, fieldName: "CategoryName",
                ignoreCase: true, strategy: DefaultSortingStrategy.instance()
            }
        ];
    }
github IgniteUI / igniteui-angular-samples / src / app / tree-grid / tree-grid-sorting-sample / tree-grid-sorting-sample.component.ts View on Github external
public ngOnInit(): void {
        this.data = FOODS_DATA();
        this.treegrid1.sortingExpressions = [
            { dir: SortingDirection.Asc, fieldName: "UnitPrice",
              ignoreCase: true, strategy: DefaultSortingStrategy.instance() }
        ];
    }
github IgniteUI / igniteui-angular-samples / src / app / tree-grid / tree-grid-summary2-sample / tree-grid-summary2-sample.component.ts View on Github external
public ngOnInit() {
        this.grid1.sortingExpressions = [
            { dir: SortingDirection.Desc, fieldName: "ID",
              ignoreCase: true, strategy: DefaultSortingStrategy.instance() }
        ];
    }
github IgniteUI / igniteui-angular-samples / src / app / grid / grid-groupby-summary-sample / grid-groupby-summary-sample.component.ts View on Github external
constructor() {
        this.data = LOCAL_DATA;
        this.expr = [
            { dir: SortingDirection.Asc, fieldName: "ShipCountry", ignoreCase: false,
              strategy: DefaultSortingStrategy.instance() }
        ];

        this.summaryPositions = [
            {
                label: GridSummaryPosition.top,
                selected: this.summaryPosition === GridSummaryPosition.top,
                togglable: true
            },
            {
                label: GridSummaryPosition.bottom,
                selected: this.summaryPosition === GridSummaryPosition.bottom,
                togglable: true
            }
        ];

        this.summaryCalcModes = [
github IgniteUI / igniteui-angular-samples / src / app / grid-finjs / grid-finjs-demo.component.ts View on Github external
public onChange(event: any) {
        if (this.grid1.groupingExpressions.length > 0) {
            this.grid1.groupingExpressions = [];
        } else {
            this.grid1.groupingExpressions = [{
                dir: SortingDirection.Desc,
                fieldName: "Category",
                ignoreCase: false,
                strategy: DefaultSortingStrategy.instance()
            },
            {
                dir: SortingDirection.Desc,
                fieldName: "Type",
                ignoreCase: false,
                strategy: DefaultSortingStrategy.instance()
            },
            {
                dir: SortingDirection.Desc,
                fieldName: "Contract",
                ignoreCase: false,
                strategy: DefaultSortingStrategy.instance()
            }
            ];
        }
    }
github IgniteUI / igniteui-angular-samples / src / app / grid / grid-groupby-summary-styling-sample / grid-groupby-summary-styling-sample.component.ts View on Github external
constructor() {
        this.data = INVOICE_DATA;
        this.expr = [
            { dir: SortingDirection.Asc, fieldName: "ShipCountry", ignoreCase: false,
              strategy: DefaultSortingStrategy.instance() }
        ];

        this.summaryPositions = [
            {
                label: GridSummaryPosition.top,
                selected: this.summaryPosition === GridSummaryPosition.top,
                togglable: true
            },
            {
                label: GridSummaryPosition.bottom,
                selected: this.summaryPosition === GridSummaryPosition.bottom,
                togglable: true
            }
        ];

        this.summaryCalcModes = [