PDA

View Full Version : Changing Grid's Selection Model



JasonMichael
19 May 2007, 8:51 PM
After I have a grid object already created, is it possible to change its selection model?

I'm using the following code, which after refreshing the grid, the selection mode seems to be the same - using the CellSelectionModel:


el6.on('click', function(e){
e.stopEvent();
Ext.example.grid2.selModel= new Ext.grid.RowSelectionModel({singleSelect:false});
var useridvalue=el2.getValue();

Ext.example.ds2.reload({ params:{start: 0,limit: 120,user_id:el2.getValue(),a:'getdata',displaycols:'id',t2:'inventory'}});
Ext.example.grid2.getView().refresh();


});

JasonMichael
20 May 2007, 1:39 PM
I ended up giving up on this, and recreating the grid... along with recreating the column model and datastore of course...reseting baseparams - whole nine yards nested in a nice little IF statement. It was 7am - got the job done.