CodeCharge Studio All ASP PHP Perl ColdFusion Java C#.NET VB.NET

Editable Grid Form Reference

Design-Time Properties

Property Description
Name The name of the form.
Connection The database connection from where information will be retrieved.
Data Source Type The type of data source or the method used to retrieve the data.
Data Source The database column, SQL Query or other expression from where the data will be retrieved.
Return Page The page to which the user is directed to after the form has been submitted successfully.
Remove Parameters Specify a semicolon-separated list of parameters that should be removed from the hyperlink.
Convert URL To Specify whether URLs should be automatically converted to absolute URLs or secure URLs for the SSL protocol (https://).
Records Per Page The number of records to be displayed per page by default.
Page Size Limit The maximum number of records a user may opt to display per page if using a search form that allows control over the number of records displayed.
Restricted Specify whether users must be logged in before accessing the form.
Empty Row Number of empty rows.
Allow Insert Specify whether the form can be used to insert new data.
Allow Update Specify whether the form can be used to update existing data.
Allow Delete Specify whether the form can be used to delete existing data.
Delete Control Specifies the control value used as a deletion indicator for the rows of the Editable Grid.
Preserve Parameters Specify whether Get or Post parameters should be preserved.
Custom Insert Type If you wish to override the default insert mechanism, select the type of method to be used to perform the insert operation.
Custom Insert Specify the procedure to be used to insert data.
Custom Update Type If you wish to override the default update mechanism, select the type of method to be used to perform the update operation.
Custom Update Specify the procedure to be used to update data.
Custom Delete Type If you wish to override the default delete mechanism, select the type of method to be used to perform the delete operation.
Custom Delete Specify the procedure to be used to delete data.

Events

Event Description
Server Side Events
Before Select This event occurs at the onset of the operations performed to select records from the database.
Before Show This event occurs before a component is rendered to the page.
Before Show Row This event occurs before each row in the form is displayed.
Before Build Select This event occurs before the creation of the query that will be used to retrieve records from the database.
Before Execute Select This event occurs immediately before a row selection query is executed but after the query has been composed.
After Execute Select This event occurs after the row selection query has been executed and a recordset for the result is returned.
On Validate This event occurs after standard validation operations have been performed as a result of submitting values, but before any database operations have been performed with the submitted values.
Before Submit This event occurs at the onset of the operations performed to submit a database record.
After Submit This event occurs after submitting an existing row in the data source.
Before Build Insert This event occurs before the creation of the query that will be used to insert a new record into the database.
Before Execute Insert This event occurs immediately before a row insertion query is executed but after the query has been composed.
After Execute Insert This event occurs after new row insert query has been executed.
Before Build Update This event occurs before the creation of the query that will be used to update database content.
Before Execute Update This event occurs immediately before a row update query is executed but after the query has been composed.
After Execute Update This event occurs after a row update query has been executed.
Before Build Delete This event occurs before the creation of the query that will be used to deleted a database record.
Before Execute Delete This event occurs immediately before a row deletion query is executed but after the query has been composed.
After Execute Delete This event occurs after a row deletion query has been executed.
Client Side Events
On Load Used for binding Validation rules to the control.
On Submit Occurs on the client side when the user submits the form, before the data is sent to the server from the form.

Run-Time Properties (ASP)

Property Description
DataSource This property stores a reference to the data source bound to the form. The data source handles all data retrieval and update operations. It serves as an abstraction layer that hides underlying data source details, whether it is a database table, SQL query or stored procedure.
DeleteAllowed This property determines whether the delete operation should proceed or not. The value of this property is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Delete event.
EditMode This property specifies the mode in which a form currently is in. A form can either be in Insert mode or Edit mode.
EmptyRows This property specifies the number of empty rows to be displayed for inserting new data.
ErrorMessages This property contains any error messages pertaining to each of the rows in the Editable Grid.
Errors This property contains any error messages pertaining to the entire form as a whole.
InsertAllowed This property determines whether the insert operation can proceed or not.
IsFormSubmitted This property determines how a form is processed based on whether the form is being shown for the first time or has been submitted for postback. In the initial display, the form fields are assigned data values before being displayed. Otherwise if the form has been submitted for postback, the submitted data is processed based on the operation that was initiated upon submission.
PressedButton This property contains the name of the form submit button which was clicked to initiate postback.
ReadAllowed This property determines whether the data read operation can proceed or not.
Recordset This property contains a recordset in which are all the records that will be shown in the form.
UpdateAllowed  This is a boolean property whose value determines whether the update operation should proceed or not. The value of this property is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Update event.
Visible  This property determines whether the form is to be shown or not. 

Data Source properties

Property Description
DataSource.CountSQL  This property contains the SQL query which is executed to determine the total number of browseable rows in the Editable Grid form. The number retrieved as a result of executing this query is used during the creation of the navigation controls for the form.
DataSource.SQL  This property contains the main portion of the SQL query used to retrieve the records displayed within the form. In terms of SQL, this property defines the SELECT and FROM clauses of the SQL query.
DataSource.Where  This property contains the WHERE clause portion of the SQL query used to retrieve records for the form. The WHERE clause provides the criteria which filters the records retrieved. The value of this property is appended to the value of the DataSource.SQL property to create the final SQL query which is executed against the datasource to retrieve the records for the form.
DataSource.Order This property contains the ORDER BY clause portion of the SQL query used to retrieve records for the control. The ORDER BY clause determines the order of appearance of the retrieved records. The value of this property is appended to the value of the DataSource.SQL property to create the final SQL query which is executed against the datasource to retrieve the records for the control.
DataSource.CmdExecution This property determines whether or not the Insert, Update or Delete operation should proceed depending on the used BeforeExecuteInsert, BeforeExecuteUpdate or BeforeExecuteDelete event.
Recordset.RecordCount This property contains a count of all the records that have been retrieved for the form.

Run-Time Properties (PHP)

Property Description
ComponentType Specifies type of an object, such as "TextBox", "Record", etc.
Parent Specifies parent container of an object, for example a record form for a textbox that is included within that form.
DataSource  This property stores a reference to the data source bound to the specified object. The data source handles all data retrieval and update operations. It serves as an abstraction layer that hides underlying data source details, whether it is a database table, SQL query or stored procedure.
DeleteAllowed  This property determines whether the delete operation should proceed or not. The value of this property is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Delete event.
EditMode  This property specifies the mode in which a form currently is in. A form can either be in Insert mode or Edit mode.
EmptyRows  This property specifies the number of empty rows to be displayed for inserting new data.
Errors  This property contains any error messages generated during execution of the form.
InsertAllowed  This property determines whether the insert operation can proceed or not.
PressedButton  This property contains the name of the form submit button which was clicked to initiate postback.
ReadAllowed This property determines whether data read operation can proceed or not.
UpdateAllowed This is a boolean property whose value determines whether the update operation should proceed or not. The value of this property is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Update event.
Visible This property determines whether the component is to be shown or not.

Data Source properties

Property Description
DataSource->CountSQL  This property contains the SQL query which is executed to determine the total number of browseable rows in the Editable Grid form. The number retrieved as a result of executing this query is used during the creation of the navigation controls for the form.
DataSource->SQL  This property contains the main portion of the SQL query used to retrieve the records displayed within the form. In terms of SQL, this property defines the SELECT and FROM clauses of the SQL query.
DataSource->Where  This property contains the WHERE clause portion of the SQL query used to retrieve records for the form. The WHERE clause provides the criteria which filters the records retrieved. The value of this property is appended to the value of the DataSource->SQL property to create the final SQL query which is executed against the datasource to retrieve the records for the form.
DataSource->Order This property contains the ORDER BY clause portion of the SQL query used to retrieve records for the control. The ORDER BY clause determines the order of appearance of the retrieved records. The value of this property is appended to the value of the DataSource->SQL property to create the final SQL query which is executed against the datasource to retrieve the records for the control.
DataSource->CmdExecution This property determines whether or not the Insert, Update or Delete operation should proceed depending on the used BeforeExecuteInsert, BeforeExecuteUpdate or BeforeExecuteDelete event.
DataSource->RecordsCount This property contains a count of all the records that have been retrieved for the form.

Run-Time Variables (CF,CFT)

Variable Description
blnDeleteAllowed<control name>   This variable determines whether the delete operation should proceed or not. The value of this variable is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Delete event.
blnEditMode<control name>  This variable specifies the mode in which a form currently is in. A form can either be in Insert mode or Edit mode.
blnFormSubmitted<control_name>  This variable determines how a form is processed based on whether the form is being shown for the first time or has been submitted for postback. In the initial display, the form fields are assigned data values before being displayed. Otherwise if the form has been submitted for postback, the submitted data is processed based on the operation that was initiated upon submission.
blnInsertAllowed<control name>   This variable determines whether the insert operation can proceed or not.
blnReadAllowed<control_name>   This variable determines whether data read operation can proceed or not.
blnUpdateAllowed<control_name>   This is a boolean variable whose value determines whether the update operation should proceed or not. The value of this variable is set automatically based on the value of the Restricted property of the form. If the Restricted property is set to No, the value of this property is always True unless it is modified using event code in the Before Update event.
<control name>Rows This variable contains an array of structures identified for each grid's row. The structure has some keys such as Error,Operation.
hide<control name> This variable determines whether the control is to be shown or not.
intEmptyRows  This variable specifies the number of empty rows to be displayed for inserting new data.
strOrder  This variable contains the ORDER BY clause portion of the SQL query used to retrieve records for the control. The ORDER BY clause determines the order of appearance of the retrieved records. The value of this property is appended to the value of the strSQL variable to create the final SQL query which is executed against the datasource to retrieve the records for the control.
strSQL  This variable contains the main portion of the SQL query used to retrieve the records displayed within the form. In terms of SQL, this property defines the SELECT and FROM clauses of the SQL query.
strWhere  This variable contains the WHERE clause portion of the SQL query used to retrieve records for the form. The WHERE clause provides the criteria which filters the records retrieved. The value of this property is appended to the value of the strSQL variable to create the final SQL query which is executed against the datasource to retrieve the records for the form.
strError<control name>  This variable contains any error messages generated during execution of the form.
strPressedButton  This variable contains the name of the form submit button which was clicked to initiate postback.  
query<control name>  This variable contains the query object associated with the form. 
endOperation<control name> This property determines whether or not the Insert, Update or Delete operation should proceed depending on the used BeforeExecuteInsert, BeforeExecuteUpdate or BeforeExecuteDelete event.

Methods (Servlets & JSP)

MethodDescription
setNumberEmptyRows Specify the number of empty rows to be displayed for inserting new data.
isShowEmptyRow
isAllowRead Returns a value indicating whether the data read operation can proceed or not.
setAllowRead Use to toggle the value which determines whether the data read operations can proceed or not.
isAllowInsert Returns a value indicating whether the insert operation can proceed or not.
setAllowInsert Use to toggle the value which determines whether the insert operation can proceed or not.
isAllowUpdate Returns a value indicating whether the update operation should proceed or not.
setAllowUpdate Used to toggle the value which determines whether the update operation should proceed or not.
isAllowDelete Returns a value indicating whether the delete operation should proceed or not.
setAllowDelete Used to toggle the value which determines whether the delete operation should proceed or not.
getPage Get the current page being shown in the Editable Grid.
setPage Set the page number to be shown in the Editable Grid.
getNumberOfRows Get the total number of rows.
getNavigator Use a name to find the Navigator among the collection of children controls.
getSorter Use a name to find a Sorter among the collection of children controls.
getPageSize Get the number of records per page. Equivalent to getFetchSize.
setPageSize Set the number of records per page. Equivalent to setFetchSize.
isRestricted Returns a value indicating whether users must be logged in before accessing the form.
setRestricted Specify whether users must be logged in before accessing the form.
getPageModel Get the page to which the component belongs
hasNextRow Returns true if there are more elements in a collection
nextRow Returns the next row. If the next row isn't available, this method returns an empty HashMap; This method never returns a null.
currentRow Returns the current row.
getChild Specify a name to find a child control among the collection of children controls.
getChildren Return all children controls of a collection.
getControl Specify a name to find a Control among the collection of controls.
getFileUpload Specify a name to find a FileUpload control among the collection of children controls.
getButton Specify a name to find a Button control among the collection of children controls.
getListBox Specify a name to find a Listbox control among the collection of children controls.
getRadioButton Specify a name to find a Radiobutton control among the collection of children controls.
getCheckBoxList Specify a name to find a Checkbox List control among the collection of children controls.
getLink Specify a name to find a Link control among the collection of children controls.
getDatePicker Specify a name to find a Date Picker control among the collection of children controls.
isVisible Returns a value indicating whether this control should be displayed or not.
setVisible Specify whether the form should be shown or not.
isCmdExecution Returns a value indicating whether the operation should proceed or not.
setCmdExecution Specify whether the operation should be performed or not.
getParent Get the parent component that contains the form.

Run-Time Properties (.NET)

Editable Grid Interface objects

Property Description
System.Web.UI.WebControls.Repeater <control name>Repeater. The Repeater object which holds all Editable Grid controls. See the .NET Framework SDK reference
System.Collections.Specialized.NameValueCollection <control name>Errors. The collection of global critical errors, such as DataProvider errors. See the .NET Framework SDK reference.
<control name>DataProvider <control name>Data The Data Source Provider for the Editable Grid.

Editable Grid Model Layer

Property Description
errors  This property keeps a reference to the object’s errors NameValueCollection. It is used to collect error messages generated during the object’s execution.
<control name>  For each control that is located within the form, a member property is created with the same name as the control.
IsNew  This property indicates if an item created based on an insert row.
IsEmptyItem  This property indicates if an item contains any data.
IsDeleted  This property indicates if the Delete checkbox is checked for an item
IsUpdated  This property indicates if an item has been successfully updated by the Data Provider.

Editable Grid Data Provider

Property Description
<prefix><parameter name>  For each unique parameter of the Data Source command, a member property is created with the prefix (according to parameter source type) and parameter name (according to parameter source).
SortField  Gets or sets the sort column for the Select command.
PageNumber  Gets or sets the page number for the Select command.
RecordsPerPage  Gets or sets the page size for the Select command.
CmdExecution This property altered in BeforeExecuteInsert, BeforeExecuteUpdate or BeforeExecuteDelete events determines whether the Insert, Update or Delete operation (respectively) for the current row should proceed.

Methods (.NET)

Editable Grid Model Layer

Method Description
Validate  Performs the item validation and returns true if validation is successful, otherwise false.

Editable Grid Data Provider

Method Description
Update  Performs update operations for each item in the items array.
GetResultSet  Execute a query against the database and return the items array.

See also

Editable Grid Form Overview


On-line, printable versions and updates