pex
17 Aug 2007, 4:11 AM
My grid has a column called 'count' which is rendered as anchors containing integer values. Eg.
<a href="#" class="count_anchor">53</a>
I have added a listener to these anchors as follows:
myGrid.on("click", this.onCountClick, this);
onCountClick: function(e){
if (Ext.get(e.getTarget()).hasClass('count_ancho') ) {
e.stopEvent();
console.log(this);
}
}
This works fine. However, what I want is to pass additional information to the onCountClick function, so that it can determine what anchor was clicked. I thought of adding it to the anchor's class, but this seems oldschool.
What Ext way is there to pass custom objects to the listeners' handler?
Thanks in advance
<a href="#" class="count_anchor">53</a>
I have added a listener to these anchors as follows:
myGrid.on("click", this.onCountClick, this);
onCountClick: function(e){
if (Ext.get(e.getTarget()).hasClass('count_ancho') ) {
e.stopEvent();
console.log(this);
}
}
This works fine. However, what I want is to pass additional information to the onCountClick function, so that it can determine what anchor was clicked. I thought of adding it to the anchor's class, but this seems oldschool.
What Ext way is there to pass custom objects to the listeners' handler?
Thanks in advance