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

Re: Using DataTable with Drag and Drop: Part II

Expand Messages
  • Mike M.
    One more thing! I implimented this code in my application. You ll recognize the parts that I carried over from your example. I figured that the invoice
    Message 1 of 14 , Jan 2, 2008
      One more thing! I implimented this code in my application. You'll
      recognize the parts that I carried over from your example. I figured
      that the invoice example on your site could, like my application,
      benefit from an extra step which would check the see if you've
      modified to quantity to 0 and, if so, delete that row from the invoice.

      I was proud of myself for coming up with this (don't laugh) so I
      thought I'd share it with you.


      function SaveQuantity(oArgs)
      {
      if (oArgs.editor.cell.innerHTML == 0)
      {
      row = this.getTrEl(oArgs.editor.cell);
      record = this.getRecord(row);

      this.deleteRow(row);
      delete recordRefs[record.getData().id];
      }
      else
      this.refreshRow(oArgs);
      };

      destDT.subscribe("editorSaveEvent", SaveQuantity);
    Your message has been successfully submitted and would be delivered to recipients shortly.