listeners: {
itemclick: function(o) {
// HOW DO I GET THE NAME OF THE SERIES THE USER CLICKED?
// WHAT IS THE "o" OBJECT BEING PASS IN AND WHAT METHODS OR CONTANTS CAN I CALL ON IT?
// THE CODE BELOW ONLY GIVES THE INDEX TO THE STORE BUT DOES NOT SAY WHICH SERIES WAS CLICKED BY THE USER
var rec = store.getAt(o.index);
}

}
});
}

Please help the Ext JS Documentation is not very good and I get confused just trying to find what other listeners can I use and how to use them. I have been trying to figure this out for two days with no progress.

3 Jun 2010, 7:08 AM

bigrowedogg

I figured this out using FireBug in FireFox. It turns out that the "o" object being passed into the ItemClick function has other public properties and one of them seriesIndex. So my listener code is revised to:

Code:

listeners: {
itemclick: function(o) {
//THIS SERIESINDEX POINTS TO WHICH FIELD WAS SELECTED
//IF YOUR FIELDS ARE IN SOME ARRAY THIS WILL WORK NICELY -- I JUST WISH THERE WAS GOOD DOCUMENTATION ON THIS
alert ( "Selected: " + o.seriesIndex );
var rec = store.getAt(o.index);
}

}

21 Nov 2010, 7:26 PM

cindoralla

Thanks for your help, bigroweddogg. It has puzzled me for several days.