как реализовать фильтр на стороне сервера в кендо-сетке. Я хочу отправить запрос в бэкэнд.
public state: State = {
skip: 0,
take: 5,
// Initial filter descriptor
filter: {
logic: 'and',
filters: [{ field: 'firstname', operator: 'contains', value: '' }]
}
};
public gridData: GridDataResult = process(this.userList, this.state);
public dataStateChange(state: DataStateChangeEvent): void {
this.state = state;
this.state.filter.filters.map(
function (data, index) {
// @ts-ignore
this.userData = { field: data.field, operator: data.operator, value: data.value };
}.bind(this)
);
console.log('this.userData', this.userData);
this.gridData = process(this.userList, this.state);
<kendo-grid [data]="gridData" [skip]="state.skip" [sort]="state.sort" [filter]="state.filter" [sortable]="true" [filterable]="true" (dataStateChange)="dataStateChange($event)">
<ng-container *ngFor="let column of columns">
<kendo-grid-column [field]="column.field" [title]="column.title" [filterable]="true"> </kendo-grid-column>
</ng-container>
</kendo-grid>
Заранее спасибо