I am unable to figure out why my Kendogrid Transport's read doesn't invoke ajax call when I call Kendogrid's render(). All the functions are invoked except read() of Transport. I guess some third eye is required to point out mistake in my code. Please let me know if more information is needed. Spent a day on this and couldn't.
Here is my Transport and GridView
var Transport = KendoGridView.Transport.extend({
read: function(options) {
$.ajax({
url: this._grid.url+ '?' + $.param(_.extend({},
this._parameterMap(options.data)
)),
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(myVariable),
success: function(response) {
options.success(response);
}
});
}
});
var MyGridView = KendoGridView.extend({
_url : "abc/def/ghi",
_model: MyModel, //My Backbone model
_currentPage: 1,
_transportCls: Transport
initialize: function(options) {
KendoGridView.prototype.initialize.apply(this, arguments);
},
render: function{
KendoGridView.prototype.render.call(this);
},
_dataSourceConfig: function() {
var config = KendoGridView.prototype._dataSourceConfig.call(this);
return _.extend(config, {page: this._currentPage});
},
});
return MyGridView;
I did similar way for other grids in my application. All other stuff is defined using require.js. Am I missing something ?