Announcement

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

    Confirmation message in a saveAllEdits validation

    Hey guys, how are you?

    well, I have grid settedup to setAutoSaveEdits(false) and I am performing the persistence via a button which invokes grid.saveAllEdits. Only two columns are editables, one of them, must be validated before its data be persisted in the database. However, I need to ask the user something like: "This information is already in use. Are you sure that want use it again?"

    How could I do it? See that I need to verify first if the incoming column value is already in database.

    Any comment can becomes useful.

    Thank you.

    Vitor Eduardo

    #2
    Hi vitor.eduardods,

    yes, pretty easy.
    1. On button click, do a customOperation from the client
    2. In the server DMI for the operation do the necessary checks
    3. Return inUse/notInUse from the DMI
    4. a) In the client DSCallBack, on inUse, ask your question, on OK do the save
      b) In the client DSCallBack, on notInUse, do the save
    Best regards
    Blama

    Comment


      #3
      Yes, I thought it, the same solution. Thank you @Bama.

      Comment


        #4
        Blama, How do I get the edited records to send via customOperation in order to validate them before call saveAllEdits in the callback?

        Comment


          #5
          Hi vitor.eduardods,

          never did this. It seems there no single API for this (don't know if I'm correct here). I'd look into
          Best regards
          Blama

          Comment


            #6
            Thanks Blama!

            Comment

            Working...
            X