PDA

View Full Version : how to use selectRecords , selectRow?



shuang
30 Jun 2008, 1:05 AM
i'm want use method select recorc in grid

i'm tried


...
function chkavilable(val,cell,rec){
adid = rec.get('adid');
stat = '';
if(val == 'true'){
stat = 'checked="checked"';
}
sm2.selectRecords(rec,true);
//sm2.selectRows(3,true);
return '<input name="" type="checkbox" value="'+ val +'" ' + stat + ' onclick="chkval('+ adid +')" id="'+ adid +'" />';
}
...
note : var sm2 = new Ext.grid.CheckboxSelectionModel();

it's not working


i'm want see example from anyone

help me :((