PDA

View Full Version : Grid field name



sferg989
17 Nov 2011, 8:26 AM
in Extjs 3, you could aquire the gird field name by doing


var field_name = e.field;


how do you do it in Extjs 4, in this example

this is inside of a gridpanel



viewConfig: {
listeners: {
itemclick:
function(dataview, record, item, e)
{
alert(?????);
}
}
}

mitchellsimoens
17 Nov 2011, 12:43 PM
listeners : {
itemclick : function(view, rec, item, idx, e) {
var cellNode = e.getTarget(view.cellSelector),
header = view.getHeaderByCell(cellNode);

console.log(header);
}
}

header is the column