Skip to content

How Grids Work

rrowlands edited this page Oct 29, 2019 · 3 revisions

DDMS has a Grid concept, which is both hardcoded into various forms and available to the user in the Form Generator. The Form Generator allows the user to specify one dimensional grids, and some hardcoded forms expose two dimensional grid functionality.

The one dimensional grid functionality works as following. The grid attribute allows me to define a list of "Grid Fields". Each grid field has a datatype (for example: boolean, integer, etc.). These grid attributes are defining the columns on a table that I am defining. The grid attribute has a list of associated term roots, which are defined in the GUI administration page. A row is created for each child of these roots. An example:

The terms are E, N, NE, etc. The fields are "gridBool" and "gridInteger". When these are represented in excel, they're all represented as columns. So, in our excel format, this would be represented as 8 * 2 = 16 separate columns, and each row would be a new entry into the table.

                               +-------------------+
                               |    Grid Type      |
                               +-------------------+
                               |      testInt      |
                               |        ....       |
                               +-------------------+ 
+----------------+                       |                    +----------------------+  
|     Form       |                       |                    |         Term         |  
+----------------+                       |                    +----------------------+  
|    gridAttr    |  ------------------------------------------|                      |  
|        ...     |                                            |                      |  
+--------------- +                                            +----------------------+