Search code examples
grailsgrails-pluginyui-datatable

GrailsUI (YUI) data table hover event


How to make the data table rows change color as hover over it. The YUI example is here link text

I tried something like

    <script>
  GRAILSUI.myDataTable.subscribe("rowMouseoverEvent", GRAILSUI.myDataTable.onEventHighlightRow);
  GRAILSUI.myDataTable.subscribe("rowMouseoutEvent", GRAILSUI.myDataTable.onEventUnhighlightRow);
  GRAILSUI.myDataTable.subscribe("rowClickEvent", GRAILSUI.myDataTable.onEventSelectRow);
</script>

thanks,


Solution

  • ok.. got it working.. for anyone interested, you need to wrap the above statements in

    YAHOO.util.Event.onDOMReady(function () { });

    so that the table is initialized.