Grid
A Grid widget allows users to view or add data into a table on the form, this is useful in cases where you have a many to one relationship between an item and the record. For example, many tasks which must be done for a project record. Coghead supports two types of Grid widgets, a Local Grid and a Linked Grid.
Local Grid - In a local grid, rows of the grid are defined by users when the form is created or updated. The application's author can determine the type of widget (Input Box, Combo Box, Checkbox, Attachment, Link, Date Picker) which will be used in each column of the grid. For local grids the number of rows which will appear is determined by the user who enters information into the record.
Linked Grid - A linked grid displays the record list of other collection tabs in the form area of a collection, each column in a linked grid displays a field from the linked collection. You can link to multiple collections tabs in a single linked grid. Authors can also set up a filter to display only the records that match specific criteria.
Adding an Grid to the Form
- In the Edit Form canvas drag the
from Form Widgets palette onto the form canvas. A new Grid widget is added to the canvas.

- Enter a Label for the Grid widget.
- Notice that the data structure for the grid is automatically defined. The top level data field is named after the label for the grid widget while the sub-data fields are labeled after the column titles.

- In the Properties section for the Grid choose a Grid Type of either Local or Linked.

- If you have defined the grid as Linked you will need to define the Linked Collection. You can also set up a Filter or check the Cross Collection checkbox to define more than one linked collection
- At any time you can delete a column by clicking on the red X icon for that column.

- You can also add columns by clicking on the + sign. The column will appear at the location of the sign.

- The width of a column can be defined by entering either a percent or a number of pixels in the space at the bottom of the column.

You can also change the width of a column by clicking on the column's edge and dragging it to a new size.
- Authors can also specify how many rows will appear in the grid before the scroll bar appears. To do this, enter a number in the box located at left side of the grid.
- To change the name of a column, click on that column and enter a new title.

- For more information on how to define columns in a Local Grid or a Linked Grid see the sections below.
- To re-order the columns in a grid click on the column's label and drag it to a new location.
Defining the Columns in a Local Grid
- Highlight the column that you wish to define in your Local Grid and enter a title for the column if you have not done so already.
- Click on the triangle icon to bring up a list of the type of widget you want for your column. Select the appropriate option.

- In the Properties section of the form editor, set up the column based on the options for the widget you selected. For more information see the User Guide sections on Input Box, Checkbox, Combo Box, Link, Attachment and Date Picker.
- For Link, Date Picker and Combo box columns, you can define column display properties by clicking on the Widget tab in the Properties section of the Form Editor.

Defining the Columns in a Linked Grid
- Highlight the column that you wish to define in your Local Grid and enter a title for the column if you have not done so already.
- Click on the button next to Display Field to select a field in your linked collection that you want to display in your grid's column.

- In the Select a Field window, click on the name of the field you wish to display. The Display Field in the Properties section of the Form Editor will be updated to reflect the field that is to be displayed.