Hi Isomorphic,
please see this modified sample (v12.0p_2020-04-15), where the ListGrid field width don't match the export.
If you click export, you'll see this request in the Developer Console's RPCRequest tab.
Please see the bold parts.
There are 4 exportFields (expected) and 5 exportFieldPixelWidths (unexpected).
I'd expect something like for exportFieldTitles, where there are values mapped:
Now the server would use the given width for these three fields and a default width (perhaps depending on .ds.xml length, if it's a text field) for the remaining field "gdp", where the ListGrid can't send data.
Best regards
Blama
please see this modified sample (v12.0p_2020-04-15), where the ListGrid field width don't match the export.
Code:
isc.ListGrid.create({
ID: "countryList", exportFieldWidths: true,
width:600, height:250, alternateRecordStyles:true,
dataSource: worldDSExport,
autoFetchData: true,
fields:[
{name:"countryName", title:"Country", width: 101},
{name:"capital", title:"Capital", width: 102},
{name:"continent", title:"Continent", width: 103},
{name:"independence", title:"Nationhood", width: 104},
{name:"population", title:"Population", width: 105}
],
showFilterEditor: true
});
isc.Button.create({
ID: "exportButton",
title: "Export",
top: 260,
click: function () {
countryList.exportData({ exportAs: "ooxml",
exportFields: ["gdp", "countryName", "capital", "continent"]
});
}
});
If you click export, you'll see this request in the Developer Console's RPCRequest tab.
Please see the bold parts.
There are 4 exportFields (expected) and 5 exportFieldPixelWidths (unexpected).
I'd expect something like for exportFieldTitles, where there are values mapped:
Code:
"exportFieldPixelWidths":{
"countryName": 101,
"capital": 102,
"continent": 103
},
Code:
{
"actionURL":"https://www-demos.smartclient.com/smartclient-12.0/isomorphic/IDACall",
"showPrompt":false,
"transport":"hiddenFrame",
"promptStyle":"cursor",
"bypassCache":true,
"data":{
"criteria":null,
"operationConfig":{
"dataSource":"worldDSExport",
"repo":null,
"operationType":"fetch",
"textMatchStyle":"substring"
},
"exportResults":true,
"exportAs":"ooxml",
"exportDelimiter":",",
"exportTitleSeparatorChar":"",
"exportFilename":"Results.xlsx",
"exportPath":null,
"exportDisplay":"download",
"lineBreakStyle":"default",
"exportFields":[
[B]"gdp", [/B]
"countryName",
"capital",
"continent"
],
"exportHeader":null,
"exportHeaderless":null,
"exportFooter":null,
"exportFieldTitles":{
[B] "gdp":"GDP ($M)",
"countryName":"Country",
"capital":"Capital",
"continent":"Continent"[/B]
},
"exportDatesAsFormattedString":null,
"exportNumbersAsFormattedString":null,
"exportRawValues":true,
"exportCurrencySymbol":"$",
"exportHeaderSpans":null,
"exportOtherFields":{
"gdp":"GDP ($M)",
"countryName":"Country",
"capital":"Capital",
"continent":"Continent"
},
"exportFieldPixelWidths":[
[B] 101,
102,
103,
104,
105[/B]
],
"exportWidthScale":0.12,
"exportWrapHeaderTitles":null,
"exportPropertyIdentifier":"name",
"appID":"builtinApplication",
"operation":"worldDSExport_fetch",
"oldValues":null
}
}
Blama
Comment