How can you create a grid but not load any data?
If I omit the url
option then the loadError
callback is triggered.
Currently we set
I wanted to create a grid that loads no data when the page is loaded but loads data, when the user clicks refresh or uses the search. My solution is a little bit hacky to but is very easy and works nicely.
I am using the callback event loadBeforeSend
to stop the ajax request for data when the page is loaded. My callback function removes itself so it will be executed only once.
loadBeforeSend: function (xhr, settings) {
this.p.loadBeforeSend = null; //remove event handler
return false; // dont send load data request
}