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

Re: [ydn-javascript] Editable table inside modal dialog

Expand Messages
  • Satyam
    See: http://yuilibrary.com/forum/viewtopic.php?f=89&t=1979&p=6568
    Message 1 of 7 , Dec 12, 2009
    • 0 Attachment
      See:

      http://yuilibrary.com/forum/viewtopic.php?f=89&t=1979&p=6568


      david.bill1982 escribió:
      >
      >
      > Hi,
      >
      > I'm trying to put an inline editable table inside a YAHOO.widget.Dialog.
      >
      > If the dialog is a modal dialog, the editor is coming up for each cell
      > but i am not able to edit the contents.
      > For non-modal dialogs it is working perfectly.
      >
      > Please help.
      >
      > Thanks,
      > Bill
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 9.0.716 / Virus Database: 270.14.104/2559 - Release Date: 12/11/09 20:37:00
      >
      >
    • david.bill1982
      Hi, This is working fine for TextboxCellEditor.But not for other editors like YAHOO.widget.DropdownCellEditor and YAHOO.widget.DateCellEditor. Thanks, Bill
      Message 2 of 7 , Dec 13, 2009
      • 0 Attachment
        Hi,

        This is working fine for TextboxCellEditor.But not for other editors like YAHOO.widget.DropdownCellEditor and YAHOO.widget.DateCellEditor.

        Thanks,
        Bill
      • Satyam
        What happens to them? doesn t work doesn t say much. Can you show us a working example? Satyam
        Message 3 of 7 , Dec 14, 2009
        • 0 Attachment
          What happens to them? "doesn't work" doesn't say much. Can you show us
          a working example?

          Satyam

          david.bill1982 escribió:
          > Hi,
          >
          > This is working fine for TextboxCellEditor.But not for other editors like YAHOO.widget.DropdownCellEditor and YAHOO.widget.DateCellEditor.
          >
          > Thanks,
          > Bill
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
          > ------------------------------------------------------------------------
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - www.avg.com
          > Version: 9.0.716 / Virus Database: 270.14.106/2563 - Release Date: 12/13/09 20:47:00
          >
          >
        • david.bill1982
          Hi, The dropdown cell editor was populated on cellClickEvent of the datatable. And i call column.editor.render() there. The issue is fixed by adding the
          Message 4 of 7 , Dec 14, 2009
          • 0 Attachment
            Hi,The dropdown cell editor was populated on cellClickEvent of the datatable. And i call column.editor.render() there.The issue is fixed by adding the following code along with your code:YAHOO.widget.BaseCellEditor.prototype.doAfterRender = function() { myDataTable.getTableEl().parentNode.appendChild(this.getContainerEl()); };

            Please comment on this.

            Thanks,
            Bill
          • Satyam
            Now it makes sense. Method render would recreate the complete markup for the cell editor and place it, once again, in documentBody. Your solution is good.
            Message 5 of 7 , Dec 14, 2009
            • 0 Attachment
              Now it makes sense. Method render would recreate the complete markup
              for the cell editor and place it, once again, in documentBody. Your
              solution is good.

              doAfterRender is meant to be overriden by BaseCellEditor subclasses but
              currently none of them does so you are safe. If any of them eventually
              did and if the overriding subclass does not call its superclass
              version, which it would hardly care to do, your repositioning would
              fail. This is not a problem right now, just something for you to keep
              in mind , possibly add a comment to the effect wherever you added the
              patch.

              I would normally prefer to use a more generic thing like
              this.getDataTable() instead of myDataTable, but by the time render is
              called (at least the first time), the cell editor has not been attached
              to any DataTable and such call would probably return null. Anyway, this
              is but a patch.

              Have you added yourself to the CC: list for that bug? Then you would be
              notified once it is fixed. Also, add your patch to the list of possible
              solutions, explaining that you need it so because you are populating the
              dynamically. Developers will thank you for that in the future, and so
              do I in the present.

              Satyam

              david.bill1982 escribió:
              >
              >
              > Hi, The dropdown cell editor was populated on cellClickEvent of the
              > datatable. And i call column.editor.render() there. The issue is fixed
              > by adding the following code along with your code:
              > YAHOO.widget.BaseCellEditor.prototype.doAfterRender = function() {
              > myDataTable.getTableEl().parentNode.appendChild(this.getContainerEl()); };
              >
              > Please comment on this.
              >
              > Thanks,
              > Bill
              >
              >
              >
              > ------------------------------------------------------------------------
              >
              >
              > No virus found in this incoming message.
              > Checked by AVG - www.avg.com
              > Version: 9.0.716 / Virus Database: 270.14.106/2563 - Release Date: 12/13/09 20:47:00
              >
              >
            • david.bill1982
              Hi Satyam, Thanks for your quick reply. You really helped me to solve this.I will definitely add this to the list of possible solutions. Thanks, Bill
              Message 6 of 7 , Dec 14, 2009
              • 0 Attachment
                Hi Satyam,

                Thanks for your quick reply. You really helped me to solve this.I will definitely add this to the list of possible solutions.

                Thanks,
                Bill

                --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
                >
                > Now it makes sense. Method render would recreate the complete markup
                > for the cell editor and place it, once again, in documentBody. Your
                > solution is good.
                >
                > doAfterRender is meant to be overriden by BaseCellEditor subclasses but
                > currently none of them does so you are safe. If any of them eventually
                > did and if the overriding subclass does not call its superclass
                > version, which it would hardly care to do, your repositioning would
                > fail. This is not a problem right now, just something for you to keep
                > in mind , possibly add a comment to the effect wherever you added the
                > patch.
                >
                > I would normally prefer to use a more generic thing like
                > this.getDataTable() instead of myDataTable, but by the time render is
                > called (at least the first time), the cell editor has not been attached
                > to any DataTable and such call would probably return null. Anyway, this
                > is but a patch.
                >
                > Have you added yourself to the CC: list for that bug? Then you would be
                > notified once it is fixed. Also, add your patch to the list of possible
                > solutions, explaining that you need it so because you are populating the
                > dynamically. Developers will thank you for that in the future, and so
                > do I in the present.
                >
                > Satyam
                >
                > david.bill1982 escribió:
                > >
                > >
                > > Hi, The dropdown cell editor was populated on cellClickEvent of the
                > > datatable. And i call column.editor.render() there. The issue is fixed
                > > by adding the following code along with your code:
                > > YAHOO.widget.BaseCellEditor.prototype.doAfterRender = function() {
                > > myDataTable.getTableEl().parentNode.appendChild(this.getContainerEl()); };
                > >
                > > Please comment on this.
                > >
                > > Thanks,
                > > Bill
                > >
                > >
                > >
                > > ------------------------------------------------------------------------
                > >
                > >
                > > No virus found in this incoming message.
                > > Checked by AVG - www.avg.com
                > > Version: 9.0.716 / Virus Database: 270.14.106/2563 - Release Date: 12/13/09 20:47:00
                > >
                > >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.