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

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.
Restricted Specify where users must be logged in before accessing the form.
Records Per Page The numbers 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.

Events

Event Description
Server Side Events
Before Select Occurs before calling the select operation.
Before Show Occurs before showing (populating template with data) page component or control.
Before Show Row Occurs before showing (populating template with data) each grid's row.
Before Build Select Occurs before processing parameters and building selecting query.
Before Execute Select Occurs just before initializing recordset with query data and parameters and opening it for retrieving resulting rows.
After Execute Select Occurs after data sourceís rows selection query has been executed and a recordset for the result is returned.

Run-Time Properties (ASP)

Property Description
DataSource  This property stores a reference to data source bound to the form. The data source handles all data retrieval operations. It serves as an abstraction layer that hides underlying data source details, whether it is a database table, SQL query or stored procedure.
Errors  This property keeps a reference to the formís error collection. It is used to collect error messages generated during the objectís execution. 
Recordset  This property contains the formís recordset which contains the data used to populate the form.  
Visible  This property determines whether the form will 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 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 control . 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 control. 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 control.
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.
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 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.
Errors  This property keeps a reference to the formís error collection. It is used to collect error messages generated during the formís execution. 
Visible  This property determines whether the component will 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 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->RecordsCount This property contains a count of all the records that have been retrieved for the form.

Run-Time Properties (.NET)

Grid Interface objects

Property Description
System.Web.UI.WebControls.Repeater <control name>Repeater. The Repeater object which holds all Grid controls. See the .NET Framework SDK reference.
<control name>DataProvider <control name>Data The Data Source Provider for the Grid.

Grid Model Layer

Property Description
<control name>  For each control that is located within the form, a member property is created with the same name as the control.


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.

Methods (.NET)

Grid Data Provider

Method Description
GetResultSet  Execute a query against the database and return the items array.

Run-Time Variables (CF,CFT)

Variable Description
intShownRecords  This variable contains number of the shown records on the page.
query<control name>  This variable contains query object.  
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.
hide<control name> This variable determines whether the form is to be shown or not.

Methods (Servlets & JSP)

MethodDescription
getPage Get the current page being shown in the Grid.
setPage Set the page number to be shown in the Grid.
getNumberOfRows Get the total number of rows in the Grid.
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 number of records per page. Equivalent to getFetchSize.
setPageSize Set number of records per page. Equivalent to setFetchSize.
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.
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.
isProcessed Indicates whether a component has been processed (the ccsForm parameter is equivalent to the name of the component).
hasNextRow Returns true if there are more elements in a collection.
nextRow Returns the next row. If row isn't available returns empty HashMap; never 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.
getParent Get the parent component that contains the form.

See also

Grid Form Overview


On-line, printable versions and updates