I seem to be having a problem in a GridPanel where the event handler function for the rowclick within a grid is being called for both the rowclick and the rowdblclick. I have tried other suggestions on this forum but have not been able to fix the problem. Any help would be appreciated.
Code:
function handleRowClick(grid, rowIndex, myElement){
var p = new Ext.Panel({
title: 'Project',
html: Ext.example.bogusMarkup
});
var window2 = new Ext.Window({
title: 'Detail',
modal: true,
items: p
});
window2.show();
};
function handleDoubleRowClick(grid, rowIndex, myElement){
var tab2 = new Ext.TabPanel({
renderTo: document.body,
activeTab: 1,
width:600,
height:400,
plain:true,
items:[{
title: 'Properties'
//html: "My content was added during construction."
},{
title: 'Tab1',
listeners: {activate: handleActivate}
},{
title: 'Tab2'
},{
title: 'Tab3'
},{
title: 'Tab4'
},{
title: 'Tab5'
}
]
});
var viewport = new Ext.Window({
pageX:10,
pageY:430,
title: 'Detail',
closeAction:'hide',
width:600,
items: tab2
});
viewport.show();
};
// Code to handle the events for the grid
Ext.extend(SampleGrid2, Ext.grid.GridPanel,
{
listeners: ({
'rowdblclick':handleDoubleRowClick,
'rowclick': handleRowClick
})
}