Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    EditorExitEvent returning null for newValue when value is unchanged

    I can see that behind the scenes that when a EditorExitEvent is triggered, and the use rhas not changed the existing value, that an 'undefined' is returned for newValue. On the otherhand, when the user has changed the value to be empty, a null is returned for newValue.

    The issue is that in SmartGWT, both of these values get converted to null and I am unable to tell which scenario had occurred.

    Ultimately, I want to retrieve the NEW value after the edit, whether or not the value was changed. Thus if the user does NOT change the existing value, I'd like to retrieve the existing value.

    #2
    getEditedRecord() gives you a Record with new values overlaid on old.

    Comment


      #3
      Works perfectly, thanks!

      Comment


        #4
        One more question. Is it possible to retrieve the Record corresponding to a NEW list grid entry that is just being added?

        Comment


          #5
          Have you read the "Editing Overview"? It covers all this stuff.

          There is no "Record" per se because nothing has been saved. You can get all the unsaved values via getEditValues().

          Comment


            #6
            Cool, thanks for directing me to the document. Embarrassingly, I have to say that I have not read it yet. Cheers.

            Comment

            Working...
            X