The Grid question (sometimes called the "Line Item" question) is used when you need to create a table for users to enter a series of text or numbers. One example would be a list of items along with associated information, for instance in an expenditure request.
To create a Grid question, drag the question from the question palette and drop it into a container. When you let go, you can immediately add a name for the Grid or you can click the edit pencil icon on the right and add a name when you begin configuring the grid.
Configuring the Grid
Clicking on the edit Pencil icon when you hover over the grid will bring up the Grid Configuration window.
On the Basics tab you can configure:
- The Grid label (shown above the grid on the layout)
- A CSS Class
- The Grid width (by default the grid will fill 100% of the container it's in)
- Whether the grid is Disabled/Enabled
- Whether the grid is Read-Only
- Whether the grid is Hidden or Show by default
In the Define Columns tab, you indicate how many columns you want in the grid and other attributes.
In the Add Column window you can add:
- The column name (column header)
- Any CSS style classes
- The column width (the default is to distribute the columns evenly)
- The Data type (text, static text, number, date, boolean). Note that "Static Text" allows you to add persistent text that can not be edited in the column)
- Aggregation Type (used for calculating a value including Sum, Average, Row Count, Min, Max). This will show up in the footer of the grid. Note: You need to check "Show Footer" in the "Define Rows" tab to make the calculation visible.
- Editable/Not Editable
- Required/Not Required (Note that if you require a column, ALL rows in the grid must be completed, including unused rows.
In the Define Rows tab, you can indicate: how many rows your grid should have initially. In the "Rows "Specified" field you indicate how many rows should be
- How many rows your grid should have initially. In the "Rows "Specified" field you indicate how many rows should be in the grid.
- In the "Grid Height" field you indicate how tall you want the grid to be.
- If you indicate a height that's taller than the number of rows specified there will be blank space at the bottom of the grid.
- Alternatively, if you indicate a height that's shorter than the number of rows in the grid, a scroll bar will automatically be added so the user can scroll down to the hidden rows.
- *Note: Make sure to hit the "Render" button to generate the grid before saving.
- Check the "Show Add Row" button if you'd like users to be able to add additional rows to the grid.
- Check the "Show Footer" button if you are using the Aggregation Type in any of your columns. This will add a space at the bottom of the grid to show the calculation.