This is a migrated thread and some comments may be shown as answers.

Persist and Load Grid State and Column Settings

2 Answers 449 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Saarah
Top achievements
Rank 1
Saarah asked on 12 Jul 2018, 07:00 AM

 

HI

I have an issue with these import statements. They produce errors when I include them in my code.

import { StatePersistingService } from './state-persisting.service';

import { GridSettings } from './grid-settings.interface';

import { ColumnSettings } from './column-settings.interface';

 

Are there code statements that, I am most probably missing in order for them to work?


2 Answers, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 13 Jul 2018, 12:43 PM
Hi,

The demonstrated code tries to import some classes from local files. There are two options for the error. Either the files are missing or the imported classes are not exported by the files.

I assume, that you are trying to implement locally the example demonstrated at the following link:
https://www.telerik.com/kendo-angular-ui/components/grid/how-to/persist-state

Indeed, we have missed to demonstrate the grid-settings.interface.ts and column-settings.interface.ts files but the state-persisting.service.ts is available.

Here is the grid-settings.interface.ts:
import { State, DataResult } from "@progress/kendo-data-query";
import { ColumnSettings } from "./column-settings.interface";
  
export interface GridSettings {
    columnsConfig: ColumnSettings[];
    state: State;
    gridData?: DataResult;
}

and the column-settings.interface.ts:
export interface ColumnSettings {
    field: string;
    title?: string;
    filter?: 'string'|'numeric'|'date'|'boolean';
    format?: string;
    width?: number;
    _width?: number;
    filterable: boolean;
    orderIndex?: number;
}
We will make sure to update our documentation accordingly, so that these files are visible.

Regards,
Svetlin
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Dimitris
Top achievements
Rank 1
Veteran
answered on 19 Nov 2020, 09:55 AM

Hi

 

This seems to work fine when reading data from a static JSON file, but when trying to use a JSON from an endpoint the process throws an not initialized datasource and we end up to an infinite loop. Can you please give an example how we can make it work properly from an endpoint?

Tags
General Discussions
Asked by
Saarah
Top achievements
Rank 1
Answers by
Svet
Telerik team
Dimitris
Top achievements
Rank 1
Veteran
Share this question
or