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);
                        }
                    }
                },
            }

 

Ext.js 4.2 默认选中Grid行

上一篇:mysql的查询过程和SQL语句优化


下一篇:原生Ajax写法