其他分享
首页 > 其他分享> > Ext.js 4.2 默认选中Grid行

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

 

标签:getRange,4.2,js,records,Ext,grid,afterlayout,var,record
来源: https://www.cnblogs.com/xielideboke/p/13154139.html