CodeCharge Studio

Grid and Record Builder

Often a grid form is used in conjunction with a record form to display multiple records and a link from the grid form records to the record form where the details of the record can be viewed and edited. For this purpose, the Grid and Record builder can be used to produce a grid form with an attendant record form. To begin, click on the Grid and Record Builder option in the Builder tab of the Toolbox.

Step 1: Selecting a Data Source

Select or create the database connection whose fields will be used in the two forms. You can select one of the existing database connections, create a new connection or select one of the sample databases.

Grid and Record Builder Settings

Parameter Description
Autoincremented primary keys If the database table has an autoincremented primary key field this prevents the builder from creating a record form with the primary key field since it will be provided by the database when a new record is inserted.

Click Next to proceed to step 2.

Step 2: Grid and Record Builder Fields

Select the fields to be shown in the grid form.

Grid and Record Builder Field Settings

Parameter Description
Data Source Select the table from where the data will be retrieved.
Build Query Brings up the Visual Query Builder window where you can setup a SQL query that will act as the grid data source.
Refresh Refreshes the connection if you make changes to the database after having begun using the builder.
Available Fields This list-box shows all the fields available in the table.
Fields for the Grid These are the fields to be shown in the grid. They are selected from among the Available Fields.
Select an Available Field then click this button to add it to the grid.
Click this button to add ALL Available Fields to the grid.
Select a grid field then click this button to remove it from the grid.
Click this button to remove all fields from the grid.
Select a grid field then click this button to move it upwards in the order of appearance.
Select a grid field then click this button to move it downwards in the order of appearance.
Order by Order the records in the grid will be initially displayed.

Click Next to proceed to step 3.

Step 3: Creating a Search Form (optional)

Step 3 is optional and should and be used only if you want to have a search form that can filter the records displayed in the grid. If a search form is not needed click Next to proceed to step 4.

Grid and Record Builder Search Settings

Parameter Description
Create Search/Filter Indicates your intention to create a search form.
Sorting list box Gives the search form two list-boxes for sorting. The first one will contain a list of all the available fields so that the user can select the field to sort by. The second list-box will indicate the desired sort order (ASC, DESC).
Records per page list box The search form will have a list-box that can be used to specify the number of records to be returned per page.
Orientation Specifies vertical or horizontal orientation of the search form.
Advanced... Specify advanced search options such as submit method, type and other properties. If AND is selected, the search form will have an input form control for all the fields. If OR is selected, the search form will have only one input form control. Any value entered into the single control will be used to search against all the fields in the form. After you set the advanced options you can use the Preview button to view the final form with your selection.
Available Fields This list-box shows all the fields available in the table or view.
Search Fields These are the fields to be shown in the search form. They are selected from among the Available Fields.
Select an Available Field then click this button to add it to the form.
Click this button to add ALL Available Fields to the form.
Select a form field then click this button to remove it from the form.
Click this button to remove all fields from the form.
Select a form field then click this button to move it upwards in the order of appearance.
Select a form field then click this button to move it downwards in the order of appearance.
Control Type Specify the control type to be used for each of the fields in the form.

Click Next to proceed to step 4.

Step 4: Selecting Grid Options

Specify the type of sorting and navigation controls to appear in the grid form.

Grid and Record Builder Option Settings

Parameter Description
Sorting Select the type of sorting controls that you want to have in the grid.
Page Navigator Select the type of navigation controls that you want to have in the grid.
Modify Opens the 'Custom Navigator' window where you can customize the controls to suit your needs.
Records per page Specify the default number of records to be shown per page.
No records found message Specify the message that will be displayed in the grid if there are no records to be shown.
Display the total number of records Specify if the label which shows the total number of records in the record set should be displayed above the grid.

Click Next to proceed to step 5.

Step 5: Linking the Grid to the Record

The last step in configuring the grid is selecting the field to be used to link the records in the grid to the details in the record form. You can select any one of the fields that are already in the grid or specify a new column to act as the link to the record form.

Click Next to proceed to step 6.

Step 6: Configuring the Record Form

The record form will be based on the same table as was the grid form but you have the option of selecting different fields to appear in the record form. After adding the fields, you should also select the Control Type to be used for each of the fields.

At this point, you can use the Preview button to view the final form.

Click Next to proceed to step 7.

Step 7: Selecting Record Options

Select the type of operations you want the user to be able to perform using the record form. In the illustration below, the 'Allow Delete' option is disabled meaning that the record form will not allow the user to delete any existing records.

Click Next to proceed to step 8.

Step 8: Selecting a Style

Select a style to be used to display both forms. You can use the Preview button to view the final form. Click the Finish button to close the builder and generate the forms.


On-line, printable versions and updates