Ext.js 4.2 默认选中Grid行

 

添加监听事件:afterlayout

            listeners: {
                afterlayout: function (grid) {
                    debugger;
                    var records = grid.getStore().getRange();
                    for (var i = 0; i < records.length; i++) {
                        var record = records[i];
                        if (record.get('Point') != 0) {
                            grid.getSelectionModel().select(record, true);
                        }
                    }
                },
            }

 

posted @ 2020-06-17 18:50  六月雨  阅读(370)  评论(0编辑  收藏  举报