Announcement

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

    How to edit ListGrid record using popup DynamicForm?

    Hello,

    I have a ListGrid containing several rows of data, and if I click one record and I click an Edit button, I get a popup window with a DynamicForm inside it. And I've set this Form's default values as the values from the ListGrid via ListGrid.getSelectedRecord().Field

    The problem is, how do I save the edits made in the form, so that it updates the selected record in the ListGrid??

    Kind regards

    #2
    Strange enough, I am able to edit the first row from the Listgrid, but somehow I'm not able to edit the others.

    At the moment I use DynamicForm.saveData(), then I destroy the popup window and then I use removeSelectedData.

    But I'm sure there is an easier way to do this?

    Comment


      #3
      Assuming you the grid and form are using the same DataSource, call DynamicForm.editSelectedData(grid) to edit the selected record in the grid. If the desired record is not selected, call .editRecord() instead. Whatever you do, don't try to delete the record from the grid (unless you are really deleting the record) - the form edit and .saveData() call will take care of the synchronization.

      Comment


        #4
        Thanks, it worked!!!

        Comment

        Working...
        X