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

Datatable does not update cell value in 2.5.x using Satyam's 2.4.0 tutorial

Expand Messages
  • Jason
    Anyone had success updating the lines in Satyam s 2.4.0 datatable tutorial tied to an external db where the value gets updated in the datatable after it
    Message 1 of 5 , Aug 14 5:03 PM
      Anyone had success updating the lines in Satyam's 2.4.0 datatable
      tutorial tied to an external db where the value gets updated in the
      datatable after it successfully returns from the asynchRequest?

      Here's the code block from the example:

      // -------- on success section

      this._oRecordSet.updateKey(this._oCellEditor.record,
      this._oCellEditor.column.key, newData);
      this.formatCell(this._oCellEditor.cell);

      // --Tried replacing the lines above with the line below per another
      post with no luck
      // this.updateRow(this._oCellEditor, newData);

      this.resetCellEditor();
      this.fireEvent("editorSaveEvent",
      {editor:this._oCellEditor, oldData:oldData, newData:newData});
      // -------- end of on success section

      I got it working nicely using 2.4.0 but would like to use the updated
      api. In 2.5.x it updates the database but the value remains the same
      in the datatable??!!?? Strangely, if I click on the cell again after
      the update, the textbox still holds the newData value. Any insight
      into this issue is very much appreciated!

      Jason.
    • Dasaradhi Kumar Abbaraju
      Hi, This group helps me a lot. Can somebody plase clarify following? I want to display dynamic Tree view with XML output. 1. Whats the format of the XML
      Message 2 of 5 , Aug 14 9:44 PM
        Hi,

        This group helps me a lot.

        Can somebody plase clarify following?

        I want to display dynamic Tree view with XML output.

        1. Whats' the format of the XML output?
        2. How does loadNodeData() knows the XML format? Do we
        need to modify loadNodeData method?

        Appriciate your help
        Thansk,
        Raj
      • Satyam
        ... Whatever you want, this will be up to you how you generate it and how you read it. TreeView knows nothing about XML. ... It doesn t, it is up to you. You
        Message 3 of 5 , Aug 16 12:46 AM
          Dasaradhi Kumar Abbaraju wrote:
          > Hi,
          >
          > This group helps me a lot.
          >
          > Can somebody plase clarify following?
          >
          > I want to display dynamic Tree view with XML output.
          >
          > 1. Whats' the format of the XML output?
          >
          Whatever you want, this will be up to you how you generate it and how
          you read it. TreeView knows nothing about XML.
          > 2. How does loadNodeData() knows the XML format? Do we
          > need to modify loadNodeData method?
          >
          >
          It doesn't, it is up to you. You just set up a function that will fetch
          the data, from wherever it is, reads and parses it from whichever format
          it is in and starts creating and attaching the new nodes. TreeView
          doesn't know where it comes from, what the format is, nothing at all, it
          is all up to your loading function.

          Satyam

          > Appriciate your help
          > Thansk,
          > Raj
          >
          >
          >
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          > No virus found in this incoming message.
          > Checked by AVG - http://www.avg.com
          > Version: 8.0.138 / Virus Database: 270.6.3/1611 - Release Date: 14/08/2008 6:20
          >
          >
          >
          >
        • Satyam
          Currently, for 2.5.2 I m using: var recData = record.getData(); recData[column.key] = this._oCellEditor.value; this.updateRow(record,recData);
          Message 4 of 5 , Aug 16 1:06 AM
            Currently, for 2.5.2 I'm using:

            var recData = record.getData();
            recData[column.key] = this._oCellEditor.value;
            this.updateRow(record,recData);
            this.resetCellEditor();
            this.fireEvent("editorSaveEvent", {'editor':editor,
            'oldData':oldData, 'newData':newData});

            I don't remember why I changed it, I probably had the same issue you've
            found now.

            Jason wrote:
            > Anyone had success updating the lines in Satyam's 2.4.0 datatable
            > tutorial tied to an external db where the value gets updated in the
            > datatable after it successfully returns from the asynchRequest?
            >
            > Here's the code block from the example:
            >
            > // -------- on success section
            >
            > this._oRecordSet.updateKey(this._oCellEditor.record,
            > this._oCellEditor.column.key, newData);
            > this.formatCell(this._oCellEditor.cell);
            >
            > // --Tried replacing the lines above with the line below per another
            > post with no luck
            > // this.updateRow(this._oCellEditor, newData);
            >
            > this.resetCellEditor();
            > this.fireEvent("editorSaveEvent",
            > {editor:this._oCellEditor, oldData:oldData, newData:newData});
            > // -------- end of on success section
            >
            > I got it working nicely using 2.4.0 but would like to use the updated
            > api. In 2.5.x it updates the database but the value remains the same
            > in the datatable??!!?? Strangely, if I click on the cell again after
            > the update, the textbox still holds the newData value. Any insight
            > into this issue is very much appreciated!
            >
            > Jason.
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
            > No virus found in this incoming message.
            > Checked by AVG - http://www.avg.com
            > Version: 8.0.138 / Virus Database: 270.6.3/1611 - Release Date: 14/08/2008 6:20
            >
            >
            >
            >
          • Jason
            Thanks for your response and your fabulous tutorials...You got me back on the right track, here s what I ended up with to get it to work for me in 2.5.2: var
            Message 5 of 5 , Aug 19 10:31 AM
              Thanks for your response and your fabulous tutorials...You got me back
              on the right track, here's what I ended up with to get it to work for
              me in 2.5.2:

              var recData = this._oCellEditor.record.getData();
              recData[this._oCellEditor.column.key] = this._oCellEditor.value;
              this.updateRow(this._oCellEditor.record,recData);
              this.resetCellEditor();
              this.fireEvent("editorSaveEvent", {'editor':this._oCellEditor,
              'oldData':oldData, 'newData':newData});

              Thanks again! Jason.




              --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
              >
              > Currently, for 2.5.2 I'm using:
              >
              > var recData = record.getData();
              > recData[column.key] = this._oCellEditor.value;
              > this.updateRow(record,recData);
              > this.resetCellEditor();
              > this.fireEvent("editorSaveEvent", {'editor':editor,
              > 'oldData':oldData, 'newData':newData});
              >
              > I don't remember why I changed it, I probably had the same issue you've
              > found now.
              >
              > Jason wrote:
              > > Anyone had success updating the lines in Satyam's 2.4.0 datatable
              > > tutorial tied to an external db where the value gets updated in the
              > > datatable after it successfully returns from the asynchRequest?
              > >
              > > Here's the code block from the example:
              > >
              > > // -------- on success section
              > >
              > > this._oRecordSet.updateKey(this._oCellEditor.record,
              > > this._oCellEditor.column.key, newData);
              > > this.formatCell(this._oCellEditor.cell);
              > >
              > > // --Tried replacing the lines above with the line below per another
              > > post with no luck
              > > // this.updateRow(this._oCellEditor, newData);
              > >
              > > this.resetCellEditor();
              > > this.fireEvent("editorSaveEvent",
              > > {editor:this._oCellEditor, oldData:oldData, newData:newData});
              > > // -------- end of on success section
              > >
              > > I got it working nicely using 2.4.0 but would like to use the updated
              > > api. In 2.5.x it updates the database but the value remains the same
              > > in the datatable??!!?? Strangely, if I click on the cell again after
              > > the update, the textbox still holds the newData value. Any insight
              > > into this issue is very much appreciated!
              > >
              > > Jason.
              > >
              > >
              > > ------------------------------------
              > >
              > > Yahoo! Groups Links
              > >
              > >
              > >
              > >
              > > No virus found in this incoming message.
              > > Checked by AVG - http://www.avg.com
              > > Version: 8.0.138 / Virus Database: 270.6.3/1611 - Release Date:
              14/08/2008 6:20
              > >
              > >
              > >
              > >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.