如何在加载网格后选择网格中的行?

Bdf*_*dfy 6 extjs

Model.getSelectionModel().selectRow(0)无效...

Llo*_*oyd 20

this.store = new Ext.data.Store({
    ...
    listeners: {
        load: function() {
            this.grid.getSelectionModel().selectFirstRow();
        },
        scope: this
    }
});

this.grid = new Ext.grid.GridPanel({
    ...
    store: this.store
});
Run Code Online (Sandbox Code Playgroud)

这样的东西应该有用,假设this.store和this.grid存在,我相信你可以适应它.