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

Rebind columnMenu filter multi data

2 Answers 132 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 25 Oct 2017, 11:23 PM

Hello,

In my application we are constantly changing the data shown in a kendo grid based off of user selected filters on part of the screen (basically selections from dropdownlists). Some columns in the grid are configured with filterable: { multi: true } for the columnMenu. I need to figure out a way to rebind the data that is populated in these columnMenu filter screen.

repro steps (I can try to create a dojo if needed)

1. Load a kendo grid with at least one column configured with filterable: {multi: true} with some data

2. open the filter menu on that column

3. Change the data in the grid (grid.dataSource.data([ //... ]) 

4. open filter menu again and see that old data has persisted.

 

Thank you in advance for your time.

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 25 Oct 2017, 11:32 PM

Created a dojo to make this easier to explain

make sure to look into the column menu filter so it creates it's datasource, click the button above the grid, then see that the data in the column menu filter persisted with old values.

https://dojo.telerik.com/OdatU/3

0
Alex Hajigeorgieva
Telerik team
answered on 27 Oct 2017, 11:43 AM
Hello, David,

One way to refresh the Kendo UI FilterMultiCheck in this scenario is to use the Kendo UI Grid setDataSource() method:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-setDataSource

Here is the updated Dojo, let me know what you think and if there is any other approach you may wish to try:

https://dojo.telerik.com/@bubblemaster/IXULi

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Alex Hajigeorgieva
Telerik team
Share this question
or