博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

为checkboxSelectionModel赋值

Posted on 2013-08-01 18:20  奥客  阅读(317)  评论(0编辑  收藏  举报

store.on('load', function(store, records, options) {   

        sm.clearSelections();   //清空数据

        Ext.each(records, function(rec) {  

           if (rec.get('selected')) {  

              sm.selectRow(store.indexOf(rec),true);   

           }  

        })  

      });