-
19 Oct 2012 7:32 AM #1
prevent grid itemclick event
prevent grid itemclick event
I have an Ext.grid.Panel with an itemclick handler that displays the details of the item in a seperate panel. The grid store's model has a column with a renderer that generates html that contain hyperlinks. I want these hyperlinks to display other details related to the row in another browser tab. Is there any way to prevent the itemclick handler from firing when the hyperlinks are clicked. A workaround would be to display the details in the panel with an itemdblclick instead but pm wants a single click.
-
20 Oct 2012 5:10 PM #2
You can do this in "beforeitemclick" event. Example:
Code:Ext.create('Ext.grid.Panel', { ... listeners: { beforeitemclick: function(view, record, item, index, event){ return event.target.tagName != 'A'; }, itemclick: function(){ console.log('grid item is clicked'); } } })


Reply With Quote