In Brief: Creates a data grid module item on the form page. In other words, the Data Grid element allows us to quickly add many form field elements to a page in a table or grid format.
Hints & Tricks: Knowing how the data grid names elements is key to implementing them in your forms. The rule is in HTML the name property of the items are created by taking the RackForms Name/Value of the item and adding an underscore, the row index number, a second underscore, followed by the column index number.
For example, if we had a data grid with a Name/Value of entryTable, the top left most element will be named:
The next element to that ones right will be:
That is, the first 0 is the row number, the 1 is the column index. It's important to note numbering always starts with 0, not 1. That is, the first row and first column index is 0, not 1.
Knowing this naming convention makes it possible to add the proper SQL+ code, for example.
Speaking of which, the fastest way to add data grid SQL+ code to your form is to just use the SQL+ Automator system. Doing so allows us to quickly add all of the needed database fields and SQL+ item logic the data grid needs to operate properly.
The type of form field item we wish to present to the user. These values can be overridden on a per-column basis as described below.
The width of the form field item.
The total width of the data grid item.
The width of the column rows.
Any border to apply to the grid.
The padding of each row.
The cell spacing of the grid.
But it would be style or any other code as well.
This is the text to use for that column.
To the left of this box is the field override select. Choose from any of the values to make that column this field type.
Below both is the Default Value / Select Options box. In this field we place the value we want the text/textarea/password fields default value to be, and for select, radio, and checkbox items, the list of items ther user can choose from.
The text to use for the row. Please note that as of Build 747 we can use a double pipe as in: || to make this row a subhead. A subhead row simply contains text for the row label and nothing else. This can be used to break larger forms into smaller bits.
Please note a double pipe is not a special character, it's simply two pipe characters, which on WIndows keyboards can be found just below Backspace, and on Mac keyboard just below Delete.