I Have four grids in Dojo, all of which update with real time data every few seconds.
I only display one grid to the user at a time, but in the background all four grids update. This makes the page slow down a lot on a mobile device (not noticeable on a PC).
Is there a way to disable updating a grid if it's not in view?
var myGrid = new (declare([Grid, DijitRegistry]))({
store: myStore, // this is a Observable(Memory())
columns:[
{field: "field1", label: "A", sortable: false},
{field: "field2", label: "B", sortable: false},
{field: "field3", label: "C", sortable: false},
{field: "field4", label: "D", sortable: false},
{field: "field5", label: "E", sortable: false}
],
selectionMode: "single",
cellNavigation: true,
queryOptions: {
sort:[{attribute: "field1", descending: true}]
}
},
myDomRef
);
is there something like
myGrid.disable();
and
myGrid.enable();
so that DOM updating only occurs if the Grid is enabled?