Dynamic Url Inside A Extjs Table Dont Work
I have a gridpanel with a subtable inside every row. Im trying to include a double click functionality (if you click 2 times in a row, obtain the id_amenaza and redirent with an ur
Solution 1:
First of all you must attach rowdblclick
to main grid. To detect which subtable row was clicked you must use event object.
Example:
'rowdblclick': function (view, record, tr, columnIndex, e) {
var cell = e.getTarget('.x-grid-subtable-cell');
if (!cell) {
return;
}
var row = Ext.get(cell).up('tr');
var tbody = row.up('tbody');
var rowIdx = tbody.query('tr', true).indexOf(row.dom);
var records = view.up('grid').getPlugin('subtable').getAssociatedRecords(record);
var subRecord = records[rowIdx];
console.log(subRecord);
}
To turn off expanding/collapsing set expandOnDblClick: false
on plugin.
Working sample: http://jsfiddle.net/7czs02yz/18/
Post a Comment for "Dynamic Url Inside A Extjs Table Dont Work"