I've been trying to get my dgrid/dstore grid in realtime. As var as I understand the function 'Observable' is deprecated, and also it doesnt work for me.
I've tried to update the grid via a Interval timer but then the whole grid is erased and new loaded. How to update the whole grid 'inline' without erasing, and showing 'loading data'?
This is my basic code:
var timer = setInterval(function() {
store.invalidate(); // Invalidate the cache
store.fetch(); // Perform a new request for all items
grid.refresh();
}, 500);
Observable does not exist in dstore, but there is a
Trackable
mixin which can be used instead. As for updating the grid when new content is fetch from the store, you could use adstore/Cache
and then pass the cachedMemory
store that mixes inTrackable
to the grid to use instead. Each time new data is added to the caching store, it will also be reflected in the grid.