I have a grid created using Gridx which will be used to monitor and manage entries. When a user clicks a row of the table, a dialog pops up and allows the user to select ignore or respond. When either is clicked, I have to update an entry in my SQL database (the same table from which this information is getting pulled) and then I want the grid to refresh with the updated information.
Basically, AFTER the SQL database is updated based on what the user selects, I want the grid to refresh with the UPDATED information.
I am new to dojo and the user of stores so please have mercy :P.
My grid is created like this:
var memoryStore = new Memory();
var jsonRest = new JsonRest({target:url, idProperty:"username", sortParam: "sortBy"});
var store = new Cache(jsonRest, memoryStore);
var grid = new Grid({......});
/*this could be very wrong, but its the only way I could get
my data to load on first load - any corrections would be appreciated*/
store.query{{}).then(function() {
grid.model.clearCache();
grid.body.refresh();
});
grid.startup();
But I can't get it to refresh after the update? By the way, I am using a synchronous cache. Any help or suggestions would be greatly appreciated!
Thanks in advance