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

Re: [ydn-javascript] Datatable inline cell editing

Expand Messages
  • Satyam
    This example: http://www.satyam.com.ar/yui/#assortedControls might help. It was done for 2.4 and then slightly changed for 2.5, your choice. Anyway, regarding
    Message 1 of 2 , May 1, 2008
    • 0 Attachment
      This example:

      http://www.satyam.com.ar/yui/#assortedControls

      might help. It was done for 2.4 and then slightly changed for 2.5, your
      choice.

      Anyway, regarding textboxes, the issue is how to make sure the user
      confirmation or cancel of the entry, that is the part I don't like much
      about not having an obvious means of confirming or canceling the change.
      That, of course, is relevant if you are sending the changes to the server
      each time. If, as with spreadsheets, you save changes for the whole sheet
      at once, that should not be a problem.

      Another way is if in the columns definitions you set
      editorOptions:{disableBtns:true} then the Ok/Cancel buttons won't show and
      the cell editor will adjust more tightly to the underlying cell. If not,
      look at method editTextbox in datatable-beta.js and use it as the basis to
      define your own editor. That one and showCellEditor is where the size of the
      overlaying edit box is set. Don't bother changing showCellEditor, you can
      fix any sizing done there in your own editor.

      There used to be a bug that if you disabled buttons there was no way to save
      the changes. I see it has been fixed for the current version, if you press
      enter it will save the changes. If you are using a previous version, Enter
      might not have any effect.

      Any handling of arrow keys to move around, saving changes and activating the
      cell editor on the moved-to cell is not supported, you'll have to handle
      that. In that same formatTextbox you can see how the Enter key is handled
      (keyCode == 13) you can do the same for other keys. Methods saveCellEditor,
      cancelCellEditor and showCellEditor are the key methods you would need to
      use..

      Satyam

      ----- Original Message -----
      From: "david_c1986" <david_c1986@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Thursday, May 01, 2008 11:34 AM
      Subject: [ydn-javascript] Datatable inline cell editing


      > Hi
      > is there any way to edit directly into the cell rather than have a
      > textbox/textarea pop up? I want to allow users to edit directly into
      > cells and have the ability to use the tab and arrow keys to navigate
      > between the cells.
      > Any advice would be great
      > Thanks
      > David
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG.
      > Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date:
      > 30/04/2008 18:10
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.