The Grid control is a control that provides a visual interface to display data in table form. The Grid control is divided into rows and columns. An intersection of a row and a column is called a cell.
NOTE: The current version of abcDB has a maximum of 40 labels, 40 textboxes, 7 dropdowns, 6 buttons, 14 checkboxes, 1 grid, 4 datepickers, 1 image, 1 scribble and 1 tab per form.
The GRID control supports the following properties.
|
Property Name |
Description |
|
Allow Adding |
Determines whether the user will be able to ADD a new record by entering data in the bottom line of the GRID. |
|
Allow Deleting |
Determines whether the user will be able to DELETE records from the GRID. |
|
Allow Edits |
Determines whether the user will be able to ‘modify’ or ‘change’ the contents of the grid. |
|
Back Color |
Background Color |
|
Column Widths |
This property allows you to specify the widths of the columns in your grid. All widths are measure in TWIPS, and must be separated by commas. Ie. To set the 1st 4 columns enter the
following: 1000,2000,1500,4000 |
|
Fore Color |
The foreground color of this GRID. |
|
SQL |
The SQL statement used to populate the grid. Make sure that the SQL statement is surrounded by double quotes. Ie. To display all the Inventory items which cost
more than $50.00, you could enter the following in the SQL property of a
GRID. “SELECT Item,Description,Weight,Color FROM Inventory WHERE price > 50” |
|
Link Field (Child) |
The name of a field in the record source of your GRID control which corresponds to your LINK FIELD (MASTER). If this property and the LINK FIELD(MASTER) property are correctly set up, any new records added in the grid will contain the correct link value. |
|
Link Field (Master) |
The name of a field in the record source of your FORM which corresponds to your LINK FIELD (CHILD). |
|
Tag |
You can use the Tag property to specify or determine the string that identifies the name of a GRID. |
|
Visible |
Specifies whether this GRID will be visible or invisible |
|
Data Server |
The remote server that this GRID’s data will be retrieved from. Use “---“ for the local device. |
|
Remote Index |
The name of the remote index (PRIMARY KEY) that is used for updating data. |
|
Remote Table |
The name of the remote table that this GRID’s data is based on. |
|
Height |
The height of this GRID in Twips* |
|
Width |
The width of this GRID in Twips* |
|
Left |
The horizontal location of the top-left corner of this GRID in Twips* |
|
Top |
The vertical location of the top-left corner of this GRID in Twips* |
TabPage
If a tab-control is present on the form, this
property determines which 'page' of the tab this control will be located
on. 0-Not on tab.
The GRID control supports the following EVENTS.
|
Event Name |
Description |
|
On Add |
The event is executed whenever a new record is added by entering new data in the bottom row of a GRID. |
|
On Current |
This event is executed whenever a new cell receives the focus. |
|
On Delete |
This event is executed whenever a record is deleted. |
|
After Update |
This even is executed whenever data is modified. |