maiky
maiky

Reputation: 3673

YUI get specific cell value when selecting a row to fire event

I am using Yahoo UI library, in particular this example.

What I want is to get a particular column's value when clicking (selecting) a row.

I am using this code:

var makis = function() {alert("blabla"); };
myDataTable.subscribe("rowClickEvent", makis);

and works, but I just don't know how to get a column's value in the particular row.

Upvotes: 1

Views: 1506

Answers (1)

maiky
maiky

Reputation: 3673

Ok i found it on my own, i am posting if anyone has the same problem.

myDataTable.subscribe("rowClickEvent", function(oArgs) {
                                        var elTarget = oArgs.target;
                                        var oRec = this.getRecord(elTarget);
                                        console.log("value:" + oRec.getData("column_we_want"));
                                }

Upvotes: 2

Related Questions