Call click event on last clicked row in YUI datatable
- by Javi
Hello,
I have a YUI datatable and I have a function which is invoked when I click on a row:
...
YAHOO.keycoes.myDatatable = myDatatable;
...
myDatatable.subscribe("rowClickEvent", oneventclickrow);
var oneventclickrow = function( args ) {
...
}
I'd like to invoke the function subscribed to rowClickEvent on the row which is currently highlighted in the datatable (the row which was clicked for the last time).
I've tried to do something like this:
YAHOO.keycoes.myDatatable.getSelectedRows()[0].rowClickEvent()
but getSelectedRows() doesn't return any row. How can I get the highlighted row in the datatable and then call the function associated with rowClickEvent?
Thanks