Hello,
I encountered problem with server side filtering. My datatabase table have like 100k rows. Iam presenting this 100k rows in kendoGrid using server filtering, paging and sorting. The problem is that whenever I type a single letter into filter input then grid makes a call to WebApi. Then again I type second letter then again call to WebApi is made. The problem is performance. I dont want grid to be calling my WebApi each letter. Is it possible to turn it off and make that only when I will unfocus input or click key Enter then the datasource.read() will be called?
9 Answers, 1 is accepted
It is unclear which type of filtering you are using. Could you please provide the relevant configuration so I can examine how the Grid is configured and assist you further?
Looking forward to your reply.
Regards,
Alexander Valchev
Telerik
http://dojo.telerik.com/IFADi
Each time I type letter into filter input dataSource calls read method. I like to prevent that and make it only happen when I type enter or I will unfocus the filter.
Second question is that. How I can do client side filtering if? Data in this case is retrieved from webapi with single call.
The behaviour occurs because filter widget (autocomplete) uses same dataSource settings as the Grid itself. That said when you see a call to the web server it is issued by the AutoComplete widget, not by the Grid.
In order to avoid this you can pass the data to the AutoComplete or turn off the serverFiltering of the AutoComplete widget. This example shows how to customize the filter widget settings.
I hope the information will help.
Regards,
Alexander Valchev
Telerik
Can you send example in typescript using angularjs?
My problem is that I have a directive that I put everywhere whenever Iam using kendoGrid. This directive sets default configuration for grid, as kendo doesnt have api like that.
Here is a snipped of my configuration. It works except for the template of cell. Iam assuming that template doesnt work as its sent as json. So basicly, how I can setup this cell templae using typescript, angularjs for all kendoGrids?
http://pastebin.com/RfexT7qX
We do not have such example written in TypeScript. Since the filter cell template is a function you may stringify it as a JSON.
Regards,
Alexander Valchev
Telerik
I made a typo in my previous answer. I meant to write "Since the filter cell template is a function you should NOT stringify it as a JSON."
Here is a runnable filter cell template example: http://dojo.telerik.com/IzoTU
Regards,
Alexander Valchev
Telerik
Hello,
I asked for angluarjs example with condition that the configuration of grid has to be inside directive. Similar to what I posted on pastebin:
http://pastebin.com/RfexT7qX
We do not have example which meets your exact requirements. In scenarios where the Kendo Widget is required to be initialized in a directive we recommend to use jQuery initialization in the directives link function.
Regards,
Alexander Valchev
Telerik