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

Re: [ydn-javascript] YUI datatable

Expand Messages
  • Satyam
    You would listen to editorSaveEvent: http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#event_editorSaveEvent The listener receives a single
    Message 1 of 2 , May 29, 2009
    • 0 Attachment
      You would listen to editorSaveEvent:

      http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#event_editorSaveEvent

      The listener receives a single argument (oArgs in the API docs) with
      three properties, editor, newData and oldData. The first one,
      oArgs.editor, is an instance of BaseCellEditor (actually, of the
      corresponding subclass of it) which has plenty of properties, amongst
      them, getRecord:

      http://developer.yahoo.com/yui/docs/YAHOO.widget.BaseCellEditor.html#method_getRecord

      Check the other methods there, some you may need as well, for example,
      getColumn because, if you have cell editing enable in more than one
      column, you need to know to which column the cell being saved belongs
      to (usually doing a switch over the Column.key property).

      DataTable method getTrEl can take a Record as its argument and will give
      you the TR element that shows the record. Then you can use
      YAHOO.util.Dom.addClass, removeClass or whatever, to assign a different
      className to the row.

      If you don't see the style attribute for that custom className show
      through, you might want to read:

      http://satyam.com.ar/yui/widgetstyles.html

      Satyam


      parth escribió:
      > I have implemented a simple YUI datatable, with one column as priority.
      >
      > I want to change the row color whenever any cell in this column is edited using a raciocelleditor.
      >
      > Is there a callback function or anyhow I can do this?
      >
      > I looked up in the API but could not find any callbackfunction for that.
      > There are some callbacks for saving the value to server and some other stuff, but it can not be used for this as it does not return handle to the current row.
      >
      > thanks and regards,
      >
      > Parth
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.339 / Virus Database: 270.12.43/2139 - Release Date: 05/28/09 08:10:00
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.