Call click event on last clicked row in YUI datatable
Posted
by Javi
on Stack Overflow
See other posts from Stack Overflow
or by Javi
Published on 2010-06-11T11:50:28Z
Indexed on
2010/06/11
11:52 UTC
Read the original article
Hit count: 347
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
© Stack Overflow or respective owner