I have a YUI datatable as follows
YAHOO.example.Data = {
bookorders: [
{id:"po-0167", date:new Date(1980, 2, 24), quantity:1, amount:4, title:"A Book About Nothing"},
{id:"po-0783", date:new Date("January 3, 1983"), quantity:null, amount:12.12345, title:"The Meaning of Life"},
{id:"po-0297", date:new Date(1978, 11, 12), quantity:12, amount:1.25, title:"This Book Was Meant to Be Read Aloud"},
{id:"po-1482", date:new Date("March 11, 1985"), quantity:6, amount:3.5, title:"Read Me Twice"}
]
}
and i added a subscribe event to it
myDataTable.subscribe("rowClickEvent", function(args){
alert("inside click1");
var rec = myDataTable.getSelectedRows()[0];
.
.
.
printTitle(record.title);
});
the problem is that i can't manage to get the selected row. i have another function printTitle to alert the title of the book on which the row was clicked.
I managed to get the selectedRow with the myDataTable.getSelectedRows()[0]. I updated my code, but now i cant seem to get the title.