Grids are perhaps the most important user-interface element in both Alventis and Designer. It is also one that is both exceptionally powerful and rather complex, so we will take a close look at Grids in this topic.
A Grid has columns and records that are sometimes also called rows.
In its most basic shape depicted above, you can scroll around to view all available records and their columns. You can also edit their values using the Grid cells. In most cases, you will first focus the desired cell by either clicking it with the mouse or by navigating to it with the keyboard's arrow/cursor keys. The record is now highlighted, and the focused cell within it is inverse-highlighted, which is a euphemism for saying "doesn't look highlighted".
To edit the cell's contents, you have several choices:
There are a few Grids in Alventis and Designer that behave slightly differently, at least in some of their columns. The difference can be that as soon as you click a cell with the mouse, you find yourself right away inside the cell (as if you had already clicked the cell once, and then the second time). Other than that, everything else works the same.
Once you have entered the new text in the cell, you have a few ways to get out:
Creating Records. You can insert a new record in a grid by focusing the grid (or any cell within it) and hitting the Insert key on the keyboard. Some grids do not allow creation of new records, in which case nothing will happen.
Deleting Records. You can delete the focused record by hitting Delete or Ctrl-Delete on the keyboard. Once again, some grids may not allow you to delete their records.
Saving Records. Once you have modified one or more cell values for a record, you must post your changes (i.e., save the record). To do so, you must simply focus any other record in the grid: just moving up or down by one record is sufficient. If the modified record is the only record in the grid, you can achieve the same effect by "pretending" to insert a new record: hit the Insert key to create a new record. You find yourself in the new empty record, and the previous modified record has been posted since it is no longer focused. You can now hit Escape to cancel the insert operation (unless inserting just happens to be exactly what you want to do at this time). In an InfoView grid, you can also post the changes using the Post button on the InfoView's toolbar.
Moving around in the grid is quite intuitive. If you are currently in an active cell, you may want to get out of it though by clicking Enter, Escape, or Tab as described above. Once the cell is merely focused, you can focus and cycle through cells and records using the Tab key. You can also move in the desired direction using the cursor/arrow keys, and all the other usual document-navigation keystrokes: Home, End, Ctrl-Home, Ctrl-End, PageUp, PageDown, Ctrl-PageUp, Ctrl-PageDown.
Sorting. Most Grids allow sorting. Sort by the desired column's values by clicking the column's header with the mouse. To toggle between Ascending and Descending sort order, just click the column header again. You will notice a little sorting arrow appear in the header of the column by which the Grid is sorted.
You can remove sorting from a column by Ctrl-clicking its header.
You can also sort by more than one column. Shift-clicking a column header preserves whatever sorting may exist in any other columns, essentially adding that column to the list of sorting ones.
Sorting may not be supported either by the Grid or by a specific column. You will notice this... well, when it doesn't work.
Grouping. Grouping is an exceptionally powerful feature that arranges grid records by common column values.
You may be familiar with the concept of Grouping from other software. If not, playing with it for 2 minutes should be enough to understand how it works and what it does, so we'll offer just one simplistic example. Imagine a grid full of car records. Each record will list such things as Make and Model – each in its own column. If you group the grid by the Make column, that column no longer appears in the grid itself. Instead, each unique Make value now appears in its own grouping row. Under each of these grouping rows, will be listed records that correspond to that Make.
To group the Grid by a particular column, drag that column's header into the Group by Box at the top of the Grid. Grids that don't display this box do not support grouping.
You can group by more than one column at a time. Just repeat grouping for as many columns as you like.
You can group in a specific order and rearrange that order directly in the Group by Box by dragging column headers where you want them to appear in that multi-level grouping hierarchy.
Ungrouping. You can ungroup by dragging the column header from the Group by Box back into the Grid's header row. You can also "put it back" by dragging it from the Group by Box and dropping it outside the Grid.
Grouping implies sorting, so if you group the grid by a column, it gets automatically sorted by that column. You can change the sort direction by clicking the column header as usual.
You can expand or collapse individual grouping rows. You can click the little Plus button with the mouse, double-click anywhere on the row (except in the Queries List grid where this action opens the double-clicked Query), or hit the '+' key on the keyboard (the one in the numeric keypad area on the far right). To collapse an open group, click the little Minus button with the mouse, double-click the row, or hit the '-' key (again, in the numeric keypad area). The numeric keypad '*' key will expand a group and all its sub-groups in case of multi-level grouping.
Column Hiding. Only the UniGrid Search Results Grid supports column hiding. You can hide columns you don't wish to see by dragging them outside the Grid and dropping them into "nowhere". The column vanishes from the Grid. To unhide the column, click the Trashcan button that is now shown in the right-hand corner of the Group by Box. This displays a pop-up Customization list of hidden columns. You can drag them back into the Grid's header row or Group by Box.
Custom Filtering. At the far right end of the Filter Box you will find the Customize button that opens the Filter Builder dialog.
The dialog may take a few minutes to wrap your head around, but it is basically quite intuitive. The cursor turns into a "hand" when you pass it over items you can change. Click the mouse to see a pop-up list of available choices.
We are not going into further detail here on the assumption that if you can successfully build a custom filter expression using multiple sub-expressions and Boolean logic, you can undoubtedly figure out this dialog. You can save and reload filter expressions using the Open and Save As buttons.
Dynamic Summaries are described in their own chapter on Grid Summaries.
Grid Cell Auto Height. Normally, Grids display each record on one line, so any text that doesn't fit in a cell is simply cut-off. Clicking the Grid Cell Auto Height toggle button can turn On or Off the mode where each record occupies as much space as it needs to fully display its cell's contents. Such "oversized" contents may be strings of long text or pictures.