Skip to Main Content

Breadcrumb

Overview: Form with Grid

The Save button on an Interactive Grid only saves the changes made to the grid. If you also have a form on the page then you should use a normal submit button which will save the form as well as the grid.

This example adds a couple form fields. For the example, these field are not persisted to the database; they are just stored in session state on the server. The Save button is removed by unchecking the Toolbar: Buttons Save checkbox. A normal submit button is added. Validations were added for Salary and Authorized By to demonstrate how errors are handled. The Justification field and Name column are required. The new 5.1 page attribute Advanced: Reload on Submit must be set to Only for Success (this is the default).

Notice that required fields are validated on the client before the page is submitted (in addition to being check on the server). For this to work Execute Validations on the submit button must be Yes and Application Compatibility Mode must be >= 5.1.

Notice also that leaving the page while there are unsaved changes applies to the form fields as well. See the Warn on Unsaved Changes attribute on the Page, Buttons, and Items.

Change Control

Employees