Thanks a lot
It was my response exactly.
and this is what I did for it :
itemList.fetchData();
itemList.data.invalidateCache();
(itemList is my ListGrid ID)
Thanks a lot
It was my response exactly.
and this is what I did for it :
itemList.fetchData();
itemList.data.invalidateCache();
(itemList is my ListGrid ID)
Hi incredi,
If you enter values into a SearchForm and click the button to perform a filter operation on a grid, you should see it hit the server and retrieve the set of filtered values based on the criteria you entered into the SearchForm.
If you hit the button a second time without changing the criteria, by default the filter operation will not hit the server again.
This is deliberate as the criteria has not changed, so the ListGrid should already be displaying the data from the server matching that criteria.
However if you want to force the ListGrid to fetch its data from the server again (without changing the filter criteria), you can call invalidateCache on the ListGrid’s “data” object.
Does this answer your question?
Isomorphic Software Support
I can’t understand how I can use invalidateCache on the ListGrid’s “data” object. I saw in your documents it just use for Resultset and DSRespnose.
Could you please show me how I can use it for a Grid?
When a databound ListGrid gets populated with data from the server, it’s “data” property is set to a ResultSet instance by default.
So you can just call any public ResultSet APIs directly on the ListGrid data object.
To drop the cache, the code would simply be:
myListGrid.data.invalidateCache()
We’ll make sure this is clearer in the documentation for 5.7
Hi again
As I use this solution I have a problem, invalidateCache() cause 2 requests to server even the search criteria is same. So it has a extra cost for us.
For example I have grid which fetch data from a datasource and invalidateCache() is enabled on its data, The grid datasource is called 2 times every time.
How we can avoid it?
Hi incredi,
Most likely, you are actually calling invalidateCache() twice, or calling invalidateCache() under a circumstance when the cache is already being invalidated automatically. If you can put together an Issue Report as described under the Debugging topic, we’d be happy to take a look.