I have a grid that is metadata driven. When the data comes back from the data source (the data that comes back includes the metadata), I parse the data with the parse method. In that method, I flatten a data structure that I received to match a list of columns that we generated by the metadata.
I have set the dataSource property of the grid to the kendo datasource that I created.
I have some actions in the page that can force the datasource to fetch its data and metadata (through dataSource.fetch). The problem that I have is it seems that I can't force the grid to update its list of columns and its data at the same time unless I completely destroy the html containing the grid.
Furthermore, the grid will also trigger a fetch of the data when it is re-rendered, causing two calls to the server to do exactly the same thing.
Is there a way to force the grid to fully re-render itself while using the data that is already in the dataSource? I tried calling dataSource.data() but it returns an empty object, although there is actually some data in the dataSource (it may have to do with the cache=false in my settings)
Thanks
I have set the dataSource property of the grid to the kendo datasource that I created.
I have some actions in the page that can force the datasource to fetch its data and metadata (through dataSource.fetch). The problem that I have is it seems that I can't force the grid to update its list of columns and its data at the same time unless I completely destroy the html containing the grid.
Furthermore, the grid will also trigger a fetch of the data when it is re-rendered, causing two calls to the server to do exactly the same thing.
Is there a way to force the grid to fully re-render itself while using the data that is already in the dataSource? I tried calling dataSource.data() but it returns an empty object, although there is actually some data in the dataSource (it may have to do with the cache=false in my settings)
Thanks