sunny gaikwad
sunny gaikwad

Reputation: 169

How to perform server side filtering in kendo grid for angular

I have to add server side filtering in my Kendo grid. How should i do it? I have tried below:

 <ng-template kendoGridFilterMenuTemplate
            let-column="column"
            let-filter="filter"
            let-filterService="filterService"
            >
            <multicheck-filter
              [isPrimitive]="true"
              [field]="column.field"
              [filterService]="filterService"
              [currentFilter]="filter"
              [data]="distinctPrimitive(column.field)"></multicheck-filter>
        </ng-template>

  public distinctPrimitive(fieldName: string): any {
     console.log("fieldName",fieldName)
    //service call
}

It is calling distinctPrimitive function multiple times

Upvotes: 1

Views: 2238

Answers (1)

topalkata
topalkata

Reputation: 2098

The Grid is agnostic of where it data comes from. It emits events for all data operations that contain the information, required for processing the data:

Grid binding and data operations

The data collection the Grid is bound to can be processed either locally, or the current state can be used to create a query string for a HTTP request that will allow the data to be processed on the server in accordance with the current Grid state, and returned and consumed on the client.

Examples of Grid bound to a server that communicates with a remote server, where all data operations are performed, are available in the following sections of the documentation:

Example 1

Example 2

Example 3

Upvotes: 1

Related Questions