在 YUI 数据表中最后单击的行上调用单击事件
我有一个 YUI 数据表,并且有一个在单击一行时调用的函数:
...
YAHOO.keycoes.myDatatable = myDatatable;
...
myDatatable.subscribe("rowClickEvent", oneventclickrow);
var oneventclickrow = function( args ) {
...
}
我想在数据表中当前突出显示的行上调用订阅 rowClickEvent
的函数(最后一次单击的行)。
我尝试做这样的事情:
YAHOO.keycoes.myDatatable.getSelectedRows()[0].rowClickEvent()
但是 getSelectedRows() 不返回任何行。如何获取数据表中突出显示的行,然后调用与 rowClickEvent
关联的函数?
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
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我展示 YUI 数据表功能时,这里是一个强大的应用程序。查看其源代码以深入了解我如何使用 YUI 数据表。
我使用像这样的助手
,当我想订阅某些事件时,我会执行以下操作
我希望它有用
Here goes a powerful application when i show YUI datatable funcionality. See its source code To get a good insight how i use YUI datatable.
I use a helper like
And when i want to subscribe some event, i do as follows
I hope It can be useful