0
votes

I have a dojo dgrid with an assigned dstore/Memory store

_instance = new Memory({
    data: {
        identifier:'monthNumeric', 
        items: []
        }
    });

When I click on the header of the grid, I see the sort arrow change, but no changes to contents in grid.

I traced through the code, ans see it build a sort object. Then it calls this code from _StoreMixins.js

_applySort: function () {
        if (this.collection) {
            this.set('collection', this.collection);
        }
        else if (this.store) {
            console.debug('_StoreMixin found store property but not collection; ' +
                'this is often the sign of a mistake during migration from 0.3 to 0.4');
        }
    },

the setting of the collection seems to create a sort function, but it does not actually execute it.

How is this supposed to work?

(I don't know if it matters, but the same store is also being used with a Dojo chart, wrapped in a DStoreAdapter. But that is not how it is being used here)

1
There are examples on dgrid.io that demonstrate sort working (including the feature grid right on the front page). Can you provide a runnable example demonstrating where it doesn't? - Ken Franqueiro
In trying to create a jsfiddle, I discovered a change between 1.0.0 and 1.1.0 that was impacting my code - ed4becky

1 Answers

0
votes

dgrid 1.1.0 added a check for _started around the refresh in setCollection

Since I never did a startup on the grid, this was not set. Once I caled startup, everything worked as desired