Submit button being disabled if no changes are made to the editable grid

Under the grid, display a SAVE button. The button should be disabled by default.
If any changes are made to the grid (i.e. if a row is added, a row is removed, or data entered for a row is changed), the button should be enabled. After the button is clicked, it should become disabled again. Any help will be appreciated.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to RAHUL GANJI

    a!textField automatically performs its saveInto when the field is unfocused (i.e. the user clicks or tabs away); the WITH() variable won't update until after that.  In general, it updates fast enough that the user can't get to the button in time even if they change something and try clicking right away.  However if you need it to be even tighter in timing, you can add 'refreshafter: "KEYPRESS"' to the a!textField which will cause the saveInto to be immediately executed every time the user changes something.  This has performance implications if you use it too much or in too many fields in a form, but with limited usage it works fine.  If I understand your scenario correctly, this is probably the solution you're looking for.

Children