I have grid(gridx/Grid) connected with my custom store which extends dojo/store/JsonRest.
My server call gets success and store.data will loaded properly.
I have my custom query() method in my store(extends JsonRest). Instead of GET request I use POST request in query() method.
query: function(){
//....custom config.......
var xhrArgs = {
url: this.url,
postData: postData,
handleAs: "json",
headers: {'Accept':'application/json','Content-Type':'application/json'},
load: function(data)
{
// ....data customization....
store.data = customizedData;
},
error: function(error)
{
console.log(error);
}
}
var results = dojo.xhrPost(xhrArgs);
results.then(function(response){
// ....data customization....
store.data = customizedData;
return customizedData;
});
return QueryResults(results);
}
I have returned dojo/store/util/QueryResults in query() method and my custom function (in then method).All are working fine. Only thing is grid not populated.