Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid.autoPersistViewState problem

    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:

    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();
    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')

    #2
    This issue has been fixed and will be in builds dated 2019-09-27 and later.

    Comment

    Working...
    X