PDA

View Full Version : grid event itemclick not fire



asics167
29 Oct 2012, 4:13 AM
i have itemclick on grid.panel, grid view.
but not fire after click mouse on row grid.. only fire select,deselect on selection model.

can i check - select fire by mouse click or not?


xtype: 'gridpanel',
dock: 'left',
id: 'grListCamera',
itemId: 'grListCamera',
autoScroll: true,
header: false,
title: 'My Grid Panel',
store: 'stListCamera',
viewConfig: {
getRowClass: function(record, rowIndex, rowParams, store) {
var num=record.data.num;
var fix=_myAppGlobal.getController('cntFirst').isFixCam(record.data.num);
str='';

if (_MainCamera==record.data.num)

{
str="maincam";

}



if ( fix >= 0)


{
// console.log('getRowClass 1'+dd);
str =" fixcam";
// console.log(record.data.num);
}



//console.log(Date()+' '+'getrowclass'+' '+record.data.num+' '+str);


return str;
},
id: 'gridCamView',
itemId: 'gridCamView',
listeners: {
itemclick: {
fn: me.onGridCamViewItemClick,
scope: me
}
}
},
columns: [
{
xtype: 'gridcolumn',
width: 0,
dataIndex: 'ch',
text: ' '
},
{
xtype: 'gridcolumn',
width: 30,
dataIndex: 'num',
text: '?'
},
{
xtype: 'gridcolumn',
width: 30,
dataIndex: 'floor',
text: '??.'
},
{
xtype: 'gridcolumn',
width: 186,
dataIndex: 'comment',
text: '????????'
},
{
xtype: 'gridcolumn',
width: 0,
dataIndex: 'name',
text: 'Name'
},
{
xtype: 'gridcolumn',
width: 0,
dataIndex: 'camX',
text: 'MyColumn6'
},
{
xtype: 'gridcolumn',
width: 0,
dataIndex: 'camY',
text: 'MyColumn7'
}
],
selModel: Ext.create('Ext.selection.CheckboxModel', {
allowDeselect: false,
showHeaderCheckbox: false,
listeners: {
select: {
fn: me.onCheckboxselectionmodelSelect,
scope: me
},
deselect: {
fn: me.onCheckboxselectionmodelDeselect,
scope: me
}
}
}),
listeners: {
itemclick: {
fn: me.onGrListCameraItemClick,
scope: me
}
}
}
]
},

mitchellsimoens
1 Nov 2012, 8:05 AM
Have you tried the itemclick on the grid panel itself not the grid view?

asics167
7 Nov 2012, 5:31 AM
I made other project, simpler, and in it everything works. I will understand. it is visible a problem that grid on tabpanel and on other tabpanel - drawsurface with sprite. probably chain listeners are blocked...