Loading ...
Sorry, an error occurred while loading the content.

52452Data Table management

Expand Messages
  • David
    Feb 9, 2010
      I'm having 2 problems with a table that I've created.

      The table has a vertical scroll bar. When I click on a row it gets highlighted and data from that row is displayed as desired.

      problem 1) When I scroll to the next record it gets highlighted but
      the previously clicked record remains highlighted which it shouldn't. Information from the second row is displayed as desired.

      problem 2) As I keep scrolling down the data from the highlighted row
      is displayed as desired but the vertical scrolling does not remain in sync with highlighted record. That is, the highlighted record is out of view. The use has to scroll to find it.

      The current event scheme is shown below.

      mDataTable.subscribe("rowMouseoverEvent",mDataTable.onEventHighlightRow);
      mDataTable.subscribe("rowMouseoutEvent",mDataTable.onEventUnhighlightRow);
      mDataTable.subscribe("rowClickEvent",mDataTable.onEventSelectRow);
      mDataTable.subscribe("rowSelectEvent", function(args){
      //access data from the currently selected row for display elsewhere.
      }

      Any ideas on how to correct the 2 problems above would be appreciated.

      Thanks.

      David

      Using YUI 2.7.
    • Show all 5 messages in this topic