2012-01-27 7 views

答えて

0

行は、ストアの 'load'イベントとRowSelectionModelオブジェクトの 'selectRows'メソッドを使用して選択できます。

var grid = new Ext.grid.GridPanel(... 
      sm:new Ext.grid.RowSelectionModel(),..); 
var store = new Ext.data.JsonStore(...); 
store.on('load',function(records){ 
    Ext.each(records,function(record){ 
      //here you construct an array of row numbers in the grid that you want   to select, based on the records you just loaded into the store , let the array be 'rows' 
     grid.getSelectionModel.selectRows(rows); 
    }) 
}); 
関連する問題