I have two listgrids that I want to refresh once I have completed an update. I have tried using ListGrid4.fetchData() and ListGrid4.filteData(). The actions are not being fired off. When i add criteria filterData or fetchData the data in the grid disappears, but the grid doesn’t reload.
click:
function () {
var rowCount = ListGrid3.getTotalRows();
for (var x = 0; x < rowCount; x++){
var test = ListGrid3.getEditValue(x,"selection");
if(test == true){
var recordRow = ListGrid3.getEditedRecord(x)
recordRow.approval = "0"
ListGrid3.updateData(recordRow)
ListGrid4.fetchData(criteria);
}
}
}
Take a look at the docs for fetchData() - you can invalidate the cache via invalidateCache(). The records probably disappeared when you added criteria because none of them match the new criteria.
thanks that worked, but now I have a new problem when i do ListGrid3.data.invalidateCache(); and ListGrid4.data.invalidateCache(); the second grid that is executed displays “loading data”. I tried using a redraw() on the second grid but that only caused the first grid to display “loading data”