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

[Solved] Using the filter autocomplete triggers a 'read' on the datasource

3 Answers 441 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lior
Top achievements
Rank 1
Lior asked on 11 Mar 2015, 07:17 PM
Hey,

I use a grid with a filter row.
Lets say I have 3 columns, each column has the default autocomplete filter.

Once the grid loads, I filter the grid by the #1 column.
As soon as I type, the grid triggers a 'read' to the datasource to fetch the data (even though it already has all the data it needs).
Once done, I can filter as much as I want locally.
When I move to the #2 and #3 filters, the same happens.

Each filter triggers the 'read' on the datasource for the first time it's being used.

Would appreciate the help to figure this out.

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 13 Mar 2015, 12:19 PM

Hello Lior,

This behavior is expected, as the AutoComplete widgets that are part of the filter row functionality use their own dataSource. You can create a dataSource, and set it on the dataBound event, so no requests are made. Here is an example:

http://dojo.telerik.com/UbOSU

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Lior
Top achievements
Rank 1
answered on 14 Mar 2015, 07:03 AM
Hey,

Thanks, that worked great, but now the filter contains duplicate values, one for each row that value appeared in.
Is there a way around it?

Thanks!
Lior
0
Kiril Nikolov
Telerik team
answered on 17 Mar 2015, 09:05 AM

Hello Lior,

I am not able to reproduce the issue, can you please edit the example that I provided in order to show the issue and we will be happy to help.

Thanks for the cooperation.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Lior
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Lior
Top achievements
Rank 1
Share this question
or