APNSoft.com - Web Controls, components for ASP.NET
 About Us 
 Articles 
 Products
 Downloads 
 Purchase
 Support

DataGrid
Controls Suite 4.5


Overview
Features
Reference Book
Component Parts
Deployment
Binding to Data
Appearance Customization
Templates
Edit Form
Client-side API
Server-side API
Live Demos




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.




© 2003-2024 APNSoft. All rights reserved.    Terms of use.