Hi Viktor,
I did manage to replicate the issue. In a nutshell, I prevent the the schema transport from loading on the first attempt and then later call the datasource.fetch method. Shortly after the grid is created, the grid is configured from some persisted settings, then the data is loaded. This prevents the grid from loading data multiple times as the config is changed.
You can see the active flag below controls this on the grid datasource.
var options = {
transport: {
active: false, // The Grid will update this setting after the grid configuration is complete. This prevents the grid datasource from loading multiple times during initialisation when various settings change.
read: function(options) {
var data = "";
if (this.parameterMap) {
var ops = (options && options.data) ? options.data : "";
data = this.parameterMap(ops);
}
if (this.active) {
$.ajax({
url: dsRef.getReadUrl(),
data: data,
dataType: "json",
success: function(result) {
// notify the data source that the request succeeded
options.success(result);
},
error: function(result) {
// notify the data source that the request failed
options.error(result);
}
});
}else {
options.success([]);
}
}
},
schema: {
model: this.getModel()
}
};
$.extend(defaultOptions, options);
this.postConfigure(defaultOptions);
return new kendo.data.DataSource(defaultOptions);
If the active flag is changed to default to true the export works fine. Unless I am doing something wrong in the custom transport I think this might be a bug? Note: this only affects grids with serverPaging set to true. Grids with serverPaging=false work fine.
I will prep a dojo
Thanks
Ryan