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

Re: How To Get the Data in a Cell of a DataTable

Expand Messages
  • Peleg
    ... Testing it now... AHHH!!!! Exactly!!! Thank You, Thank You!!!
    Message 1 of 3 , Aug 22, 2008
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "ericholmstrom"
      <hypecreations@...> wrote:
      >
      > --- In ydn-javascript@yahoogroups.com, "Peleg" <paul@> wrote:
      > >
      > > All I want to do is, when a cell is clicked, get the data that is
      > > being displayed in that cell. I am close, in that I can get the record
      > > with all the data and highlight the cell. But I either need to know
      > > the key of the column that was clicked (since I can get the data for
      > > the entire row identified by the column keys) or get the value itself.
      > > I haven't been able to figure out how to do either. I've been working
      > > on this all day, reading the docs, searching here, but no luck. Am I
      > > the first one to try this, or is it really easy I'm just having a
      > > stupid attack?
      > >
      > > Thanks,
      > > Paul S.
      > >
      >
      > Im no yui guru but see if this helps
      >
      > myDataTable.subscribe("cellClickEvent", function (oArgs) {
      > var target = oArgs.target;
      > var record = this.getRecord(target);
      > var column = this.getColumn(target);
      > var value = record.getData(column.key);
      > alert(value);
      > });
      >

      Testing it now... AHHH!!!! Exactly!!! Thank You, Thank You!!!
    Your message has been successfully submitted and would be delivered to recipients shortly.