OK understood. It's documented as you say for exportClientData and also working like that.
I think my confusion comes from the fact that I was using exportClientData() (to the browser) before and the callback worked. Therefore I assumed that it then must also somehow work for exportData(). The difference here is that because of what exportClientData() does, the part to prepare might take some time and the CallBack fires then (as the docs say) after this work (e.g. applying Hilites), and not after the file was received from the server.
For anyone finding this thread via search here a testcase to reproduce the behavior.
Thank you & Best regards
Blama
Code:
isc.ListGrid.create({ ID: "supplyItemList", width: "80%", height: "100%", alternateRecordStyles: true, dataPageSize: 1000, dataSource: supplyItem, autoFetchData: true, showFilterEditor: true, // To give exportClientData() some extra work in order to slow it down. hilites: [{ fieldName: "itemName", cssText: "color:#FF0000;", criteria: { fieldName: "itemName", operator: "greaterThan", value: "M" } }, { fieldName: [ "SKU", "category" ], cssText: "color:#FFFFFF;background-color:#639966;", criteria: { fieldName: "itemName", operator: "greaterThan", value: "M" } } ] }); isc.Button.create({ ID: "exportDataFSButton", width: 200, title: "exportData() Filesystem", click: function() { supplyItemList.exportData({ exportAs: "ooxml", exportToClient: false, exportToFilesystem: true, showPrompt: true, promptDelay: 0, promptStyle: "dialog", prompt: "Exporting data, please wait" }, function(dsResponse, data, dsRequest) { isc.say('Done'); }); } }); isc.Button.create({ ID: "exportClientDataFSButton", width: 200, title: "exportClientData() Filesystem", click: function() { supplyItemList.exportClientData({ exportAs: "ooxml", exportToClient: false, exportToFilesystem: true, showPrompt: true, promptDelay: 0, promptStyle: "dialog", prompt: "Exporting data, please wait" }, function(dsResponse, data, dsRequest) { isc.say('Done'); }); } }); isc.Button.create({ ID: "exportDataCButton", width: 200, title: "exportData() Client", click: function() { supplyItemList.exportData({ exportAs: "ooxml", exportToClient: true, exportToFilesystem: false, showPrompt: true, promptDelay: 0, promptStyle: "dialog", prompt: "Exporting data, please wait" }, function(dsResponse, data, dsRequest) { isc.say('Done'); }); } }); isc.Button.create({ ID: "exportClientDataCButton", width: 200, title: "exportClientData() Client", click: function() { supplyItemList.exportClientData({ exportAs: "ooxml", exportToClient: true, exportToFilesystem: false, showPrompt: true, promptDelay: 0, promptStyle: "dialog", prompt: "Exporting data, please wait" }, function(dsResponse, data, dsRequest) { isc.say('Done'); }); } }); isc.HLayout.create({ ID: "buttonsLayout", members: [exportDataFSButton, exportClientDataFSButton, exportDataCButton, exportClientDataCButton], membersMargin: 10, width: "100%" }); isc.VLayout.create({ members: [supplyItemList, buttonsLayout], membersMargin: 10, width: "80%", height: "100%" });
Leave a comment: