SmartClient Version: SNAPSHOT_v12.1d_2019-09-25/Enterprise Development Only (built 2019-09-25)
Chrome on OSX
Hello, please modify the automaticPreferencesNewSample like this:
Then change the sort and refresh the page, you'll see that the initialSort is reapplied.
it doesn't happen if you call fetchData with a delayCall:
countryGrid.delayCall('fetchData')
Chrome on OSX
Hello, please modify the automaticPreferencesNewSample like this:
Code:
var ds = isc.DataSource.get("countryDS");
var countryGrid = isc.ListGrid.create({
ID: "countryGrid",
width: "100%", height: 200,
autoFitData: "horizontal",
autoFitFieldWidths: true,
leaveScrollBarGap: true,
canGroupBy: true,
autoDraw: true,
canFreezeFields: true,
canAddFormulaFields: true,
canAddSummaryFields: true,
dataSource: ds,
autoPersistViewState: ["all"],
initialSort: [
{
property: "countryName",
direction: "ascending"
},
{
property: "capital",
direction: "ascending"
}
],
fields: [
{name: "countryCode", title: "Flag", type: "image", width: 50, imageURLPrefix: "flags/16/", imageURLSuffix: ".png", canSort: false},
{name: "countryName", title: "Country"},
{name: "capital", title: "Capital"},
{name: "population", title: "Population"},
{name: "area", title: "Area (km²)"}
]
}).fetchData();
it doesn't happen if you call fetchData with a delayCall:
countryGrid.delayCall('fetchData')
Comment