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

[Solved] Retain the column search value when applying filters for the grid

1 Answer 602 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Balaji
Top achievements
Rank 1
Balaji asked on 15 Oct 2015, 04:45 PM

Telerik team,

 I have a kendo UI grid and I apply filters for the grid based on the user input. Everything is working fine.

I also have the search filter for each column like here http://dojo.telerik.com/@balaji/aMoBA  (filterable: {mode:"row"})

Now let's say I have a dropdown for all the price and whenever I select a price, the grid is refreshed to show the items with that particular price. I use KendoDataSource.filter({field,value,operator}) to filter the grid.

So far everything works fine. (column search works fine and also the price change refreshes the grid).

Now let's say the user types "ABC" in the grid column search and the grid shows only the items with product name "ABC".

Now the user changes the dropdown to show the items with particular price. In this case what happens is the whole grid is refreshed to show all the items with that price. Instead what I want is "Just the items with product name "ABC" and that particular price selected in the dropdown. Also I want the name "ABC" to be in the search box so that the user knows that he searched for "ABC". How can I do this in angular way?

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 19 Oct 2015, 02:10 PM

Hello Balaji,

 

Indeed by using the described approach the current filter/filters will be replaced by price filter. I would suggest to get the current filters applied to the Kendo UI DataSource and simply add the new filter to the filters collection and pass the modified collection to the filter method. 

 

Please refer to the provided example in the Adding filters to Grid's source forum thread. 

 

Regards,
Boyan Dimitrov
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
Balaji
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or