开发者

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

开发者 https://www.devze.com 2023-02-17 09:17 出处:网络
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 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 g开发者_如何学JAVAet a column's value in the particular row.


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"));
                                }
0

精彩评论

暂无评论...
验证码 换一张
取 消