2
私はチェックボックス選択モデルを持つグリッドを持っています。グリッドのデータストアに基づいてチェックボックスを事前に選択したいと思います。誰も助けてくれますか?checkboxselectionモデル+ extjsのチェックボックスを事前に選択
私はチェックボックス選択モデルを持つグリッドを持っています。グリッドのデータストアに基づいてチェックボックスを事前に選択したいと思います。誰も助けてくれますか?checkboxselectionモデル+ extjsのチェックボックスを事前に選択
行は、ストアの '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);
})
});