Implementing a Data Grid

After establishing a data source, create a tabular grid to display its values inside a model, and connect it to an existing data source.

Implementation:

  1. Switch to the model's Definition tab.
  2. Select the intended question group.
  3. Add a new question, giving it the type Data Source Grid.
  4. Click Data Source to connect your question to a data source.
  5. Once you have used the settings in the Question Data Source window to assign a data source to your question, click Configure in the question's Properties tab.

If this is the first time anyone has configured the definition of this grid, you will be asked whether you want to automatically generate the grid's columns. If you choose Yes, one standard Label column will be added for every included field in the associated data source. If you choose No, the definition will initially be empty.

  1. In the grid's Definition use the Add button to create as many grid columns of any column type as you need.
  2. (Optional) To apply data grid expressions to your grid, switch to the Expressions panel and use the Add button to add as many as you need of any expression type.
  3. Switch to the Options panel.
  4. (Optional) If you expect the grid to display a lot of information and would prefer to split it over several pages, tick the Allow Paging check box, then use the Page Size field to specify how many rows you want each page to display.
  5. (Optional) If you want your grid's source data to be rendered as vertical columns instead of horizontal rows, tick the Vertical Aligned Columns check box. Your column headers will appear from top-to-bottom instead of left-to-right.
  6. (Optional) To make your grid easier to read, you can apply alternate highlighting to its rows by ticking the Alternate Highlight check box.

This option works by applying the kk_AlternateRowStyling style class to all rows in the resulting table. If this class does not exist as a subsidiary of the table's class in your page's style sheet, ticking this option will have no effect on your grid.

  1. Click Save.