We have an MVVM read-only grid setup using Kendo UI version 2017.3.913 and is populated using a kendo datasource with a custom transport.read() function.
The grid is loaded for the first time and when a filter dialog is opened for a column you can see the appropriate checkbox values from the datasource's dataset.
However, if the datasource changes (and has new/changed/deleted values) and is re-read (ie. datasource.read()), if you click on the same column's filter, it will open a dialog with checkbox values from the original datasource dataset and not checkbox values from the new dataset. Any updates to the datasource (new/deleted values) are not reflected in the filter dialog checkbox value options. It looks as though the filter dialog gets populated from the datasource only on the initial time it is opened, and not after subsequent reads/refreshes of the datasource.
That seems like strange behavior.
As a workaround we could call a datasource.read() and then a grid.setDataSource(datasource), but that seems to be inefficient because you have to redraw the grid values twice, and it seems like it goes against the MVVM strategy.
Is there a way to call something to reinitialize the filter dialogs after a datasource.read() so we don't have to call a setDataSource() to force the filter dialogs to be refreshed when opened after a datasource.read()?
Or maybe this is resolved by a newer version of Kendo? It looks like the new version release on January 17th 2018 (2018.1.117) seems to have an enhancement related to the "DataSource component should be able to dynamically change and update the widget", but I don't know if that is applicable.
https://github.com/telerik/kendo-ui-core/issues/3674
?If any guidance can be provided that would be greatly appreciated! thanks!
The grid is loaded for the first time and when a filter dialog is opened for a column you can see the appropriate checkbox values from the datasource's dataset.
However, if the datasource changes (and has new/changed/deleted values) and is re-read (ie. datasource.read()), if you click on the same column's filter, it will open a dialog with checkbox values from the original datasource dataset and not checkbox values from the new dataset. Any updates to the datasource (new/deleted values) are not reflected in the filter dialog checkbox value options. It looks as though the filter dialog gets populated from the datasource only on the initial time it is opened, and not after subsequent reads/refreshes of the datasource.
That seems like strange behavior.
As a workaround we could call a datasource.read() and then a grid.setDataSource(datasource), but that seems to be inefficient because you have to redraw the grid values twice, and it seems like it goes against the MVVM strategy.
Is there a way to call something to reinitialize the filter dialogs after a datasource.read() so we don't have to call a setDataSource() to force the filter dialogs to be refreshed when opened after a datasource.read()?
Or maybe this is resolved by a newer version of Kendo? It looks like the new version release on January 17th 2018 (2018.1.117) seems to have an enhancement related to the "DataSource component should be able to dynamically change and update the widget", but I don't know if that is applicable.
https://github.com/telerik/kendo-ui-core/issues/3674
?If any guidance can be provided that would be greatly appreciated! thanks!