We have already learned how to create fields and place the corresponding Controls on an InfoView. There's an important alternative to what we've seen so far, and we are going to examine it here.

 

You may have gotten used to grids by now: both Alventis and Designer use them all over the place. Designer allows you to create such grids on your own InfoView forms. The resulting grids can represent the entire table the InfoView is based on or any part thereof. Let's see how we would go about creating one.

 

 

An InfoView grid (any grid for that matter) does not represent a single field, but rather a collection of fields, possibly even all fields from a table. This is why you won't find the "Grid Control" among the choices you have for any given field. Instead, to create a grid, we simply invoke the Grid command. Clicking this button creates an empty grid and places it in the InfoView.

 

InfoViewGridNew1

 

Now that we have our grid in place, the rest is easy. To add a column "implementing" a field of the table... can you guess?... just drag the field and drop it onto the grid. Or double-click the field. Or drag the table itself from the Tables grid. Basically, the grid acts as a "recipient" of fields exactly in the same way the whole InfoView does.

 

InfoViewGridColumnCreation1

 

Editing of grids as far as moving and sizing is concerned is somewhat different from how it's done for regular items, but it should be mostly quite intuitive. The thing about the grid is: the whole grid is an item just like an Edit Box or a Label. You can select the grid as a whole, and move or resize it exactly as we've done for other types of items. What makes the grid special is that it contains other stuff within it, the most important being obviously the columns. Turns out we have virtually the same amount of control over the columns as we have over other items. Resizing of columns works just as it does in all "regular" grids: just drag the edge between the column headers with the mouse. You can select individual columns by clicking them. Since the Shift key applies to selecting/deselecting multiple items at the "real" item level (that of the whole grid), we can't use it to select multiple columns though (don't worry if you didn't follow this sentence). You can select multiple columns, "adding" to an existing selecting by Alt-clicking columns. You de-select all columns by clicking somewhere outside all columns in the grid. The Group by Box at its top may be a good place, for example.

 

InfoViewGridColumnSelectionMulti1

 

You can delete selected columns using the Delete command. We'll see later what else you can do with them. One thing you unfortunately cannot do is re-order the columns. In Design Mode, that is. Go temporarily into Preview Mode (by clicking the Design Mode toggle button BarDgnDesignMode) and the grid starts to act as any other grid, allowing you to drag-reorder columns, use grouping and sorting. While you're at it, you might as well create some Summaries too. This works exactly as it does in Alventis: enable the Summary rows you want using the Grid Group Summary or Grid Group Summaries buttons, then double-click the rows to cycle through available Summaries. Once satisfied with your adjustments, you can return to Design Mode and go back to "business as usual".

 

Just as with ordinary "standalone" Controls, the type of column that you create for a field depends on what Control you have selected for it in the Fields grid. A field with a Calculator Edit Control will, for example, create either a standalone Calculator Edit Box or a Calculator column.