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

DataTable.Keyboard events

Expand Messages
  • Harri Vainola
    Hi there DataTable works both with mouse and keyboard. This code works fine with mouse this.cellBlockSelectDataTable.subscribe( cellClickEvent , function (ev)
    Message 1 of 2 , Nov 29, 2007
    • 0 Attachment
      Hi there

      DataTable works both with mouse and keyboard.

      This code works fine with mouse

      this.cellBlockSelectDataTable.subscribe("cellClickEvent" , function (ev) {
          var column = this.getColumn(ev.target);
          var record = this.getRecord(ev.target);
          alert("R: " + record.getData(column.key) + ' C: ' + column.key);
          this.onEventSelectCell(ev);
      });

      but when I use keyboard, it doesn't fire CellClick event.
      Is there any way to find when user changes cell / row or presses Enter
      when selectionMode:"cellBlock"

      see example
      http://developer.yahoo.com/yui/examples/datatable/dt_cellselect.html.

      regards
      Harri


      Never miss a thing. Make Yahoo your homepage.
    • jennykhan
      Hi Harri, The Custom Event tbodyKeyEvent is not yet implemented but coming soon! It will enable you to exactly that -- hook into when a user presses the
      Message 2 of 2 , Dec 4, 2007
      • 0 Attachment
        Hi Harri,

        The Custom Event "tbodyKeyEvent" is not yet implemented but coming
        soon! It will enable you to exactly that -- hook into when a user
        presses the "Enter" key.

        Regards,
        Jenny



        --- In ydn-javascript@yahoogroups.com, Harri Vainola
        <harrivainola@...> wrote:
        >
        > Hi there
        >
        > DataTable works both with mouse and keyboard.
        >
        > This code works fine with mouse
        >
        > this.cellBlockSelectDataTable.subscribe("cellClickEvent" , function
        (ev) {
        > var column = this.getColumn(ev.target);
        > var record
        > = this.getRecord(ev.target);
        > alert("R: " + record.getData(column.key) + '
        > C: ' + column.key);
        > this.onEventSelectCell(ev);
        > });
        >
        > but when I use keyboard, it doesn't fire CellClick event.
        > Is there any way to find when user changes cell / row or presses Enter
        > when selectionMode:"cellBlock"
        >
        > see example
        > http://developer.yahoo.com/yui/examples/datatable/dt_cellselect.html.
        >
        > regards
        > Harri
        >
        >
        >
        >
        ____________________________________________________________________________________
        > Never miss a thing. Make Yahoo your home page.
        > http://www.yahoo.com/r/hs
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.