tonytomov/jqGrid — pull request #330 by ghiata (2012-06-06 18:02:35+00:00)
Title: beginReq and endReq should be public properties of grid

When using a custom defined ``datatype`` function for retrieving data, it's best to use the already existing methods for ``loadui``.

Here's an example:
```js
jQuery("#list").jqGrid({
loadui: 'block',
datatype: function(args){
var grid= this;
grid.beginReq(); // Show the loading indicator
CustomAjax.invoke({
url: 'hosting.php',
params: args,
successCallback: function(response) {
grid.addJSONData(response.getValue('accounts'));
grid.endReq(); // Hide the loading indicator
},
errorCallback: function(response) {
// ... Add error to message container
grid.endReq(); // Hide the loading indicator
}
}
...
});
```
Kind regards,
g.