I have a grid
and i want to select the whole record by clicking one specific cell. The problem is i cant use the checkboxmodel
seltype
, cause i want to show a custom icon on every cell. So is there any way to make it possible?
I solved the problem with the beforecellclick
event. Now it looks like this:
beforecellclick:function(grid,record,index){
if(index != 0){
return false
}
}
and I have an action column on colIndex 0:
xtype: 'actioncolumn',
tooltip:'löschen',
width: 30,
icon: '../../../../../../resources/images/16/delete_2.png',
handler:function(grid, rowIndex, colIndex){
var record = grid.getStore().getAt(rowIndex);
if( grid.getSelectionModel().isSelected(record) == false){
grid.getSelectionModel().select(record, true)
}else{
grid.getSelectionModel().deselect(record)
}
}