PDA

View Full Version : how to add a controller event to cell in grid in extjs mvc



Anthony.Hall
11 Jun 2012, 8:33 AM
In my extjs grid 'cutterGrid' i have a renderer that has the following output


<a href="#" >Product 1</a>

on my controller i have the following


'#cutterGrid':{
cellclick :this.onCutterSelectRow
},


This works but, obviously this enables click on the whole row. I just want this on a particular cell.
Here is the field in my grid



{ xtype:'gridcolumn',
dataIndex:'CutterNumber',
text:'Cutter',
renderer: renderCutter,
flex:1,
sortable: true

},


Is there a way i can filter the event in my controller. Maybe using a class link so


'#cutterGrid .myClass':{
cellclick :this.onCutterSelectRow
},