DataGrid
Controls Suite 4.5 |
| Overview |
| Features |
| Reference Book |
| Live Demos |
| | Populating with Data |
| | Columns |
| | Rows |
| | Appearance & Layout |
| | Behavior |
| | Bottom Bar |
| | Application scenarios |
| | | Master/Detail Grids |
| | | CheckBoxes |
| | | DropDowns |
| | | Images |
| | | Update Panel |
|
Edit Form is used to create a new entry or edit a current one. Edit Form is an .ascx file (User Control) to be configured by the developer independently. The DataGrid automatically loads Edit Form and displays it at the moment when user presses button "insert" or "update".
The APNSoftDataGrid.EditForm.Path property is used to inform the DataGrid which .ascx file is applied as an editing form.
In order to create a new entry the user presses the button, which performs a standard client-side procedure dg.OpenFormForInsert(). The procedure dg.OpenFormForUpdate('$RowID$') is used to open the form in "update" mode. Bottom Bar already includes the standard button for opening Edit Form in "insert" mode.
The Edit Form itself may contain buttons, which use standard client-side procedures:
- dg.InsertRow(CloseEditForm) - for "insert".
- dg.UpdateRow(CloseEditForm) - for "update".
- dg.CloseEditForm() - for closing the form.
The Edit Form is not closed automatically if the CloseEditForm=false.
For data validation use the dg.GetEditFormElement(GridID, ElementID) client-side procedure. It returns the Element on the Edit Form. By using this method, any element on the Edit Form can be validated on the client side before request to the server.
|