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

Re: [ydn-javascript] Problem submitting a Yui Datatable data

Expand Messages
  • Satyam
    ... I would push into an array an object representing each of the changes in response to editorSaveEvent: var myStack = []; myDataTable.on( editorSaveEvent ,
    Message 1 of 2 , Oct 3, 2009
    • 0 Attachment
      vino_gallantguy escribió:
      > Hi Members,
      >
      > I have been working with yui for few months now. But am new to this group. A very road block in my dev work with yui datatable forced me into this group. Now straight to my issue.
      >
      > I have a datatable with inline editors.Datasource - Local - HTML Table.
      >
      > SCENARIO :
      >
      > A YUI DATATABLE - with multiple rows with inline editors for each column. The user can edit any or all rows.
      >
      > Now ,I want to submit all edited rows at one shot and not per each cell save.
      >
      > 1) What is the best way to get this done ?
      >
      I would push into an array an object representing each of the changes in
      response to editorSaveEvent:

      var myStack = [];
      myDataTable.on('editorSaveEvent', function (oArgs) {
      var oRecord = oArgs.editor.getRecord();
      var oColumn = oArgs.editor.getColumn();

      myStack.push({'record':oRecord.getData('id'),'column':oColumn.key,'newData':oArgs.newData,'oldData':oldData});
      });


      > 2) Is there a means (Direct or indirect) by which I can force the edited data from the datatable back into the datasource (htmltable)
      > (If this can be done, my work is done)
      >
      No, the DataSource is one way and it does not keep any connection with
      the source of data.
      > 3) Is there a means by to fetch all data from the datatable at one shot
      >
      The data resides in the Recordset object, which you can reach via
      getRecordset(). It is almost an array of Record objects which you can
      fetch viar getRecord and you can loop through it with an index up to
      getLength(). From each Record, method getData returns the values.
      > 4) Is yui datatable - spring integration possible
      >
      > Say, when I say submit , I should be able to fetch all info from the datatable in my controller.
      >
      > 5) Is there any other means by which ppl have ahcieved such a scenario.
      >

      Sorry, I have no clue about either.
      > Help is very much appreciated.
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.409 / Virus Database: 270.14.3/2410 - Release Date: 10/02/09 18:24:00
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.