Grid Document

Flask Grid Files (*.dfg) hold the data that is loaded into Data Flask as a spreadsheet.  Grid files also contain column type information, and may contain external data link information.

Grids that use Agents, such as the OleDb agent, contain data link information.  The link information allows the agent to exchange values in the grid with an external database.


Figure 3-1: Grid Document.

The data held in Flask Grid Files (*.dfg) is independent of the data source.  Except where an explicit Write Data or Reload command is used, agents will not use data link information held in the grid .dfg file to exchange information with external data.

Link information may be viewed and modified using the File/Data Link command, or the [...] ellipsis button in the upper left of the grid document.

To eliminate data link information from the .dfg grid file, pick Edit/Properties/Agent and pick <No Agent> .  Save and reload the grid .dfg file.  This will remove all data link information, such as an OleDb connection string, and disable the and Write Data and Reload commands.  The .dfg file must be reloaded because agents process windows and automation messages;  It would be unsafe to unload an agent while the document is still loaded.

 


Grid Properties

Pick File/New Grid to create a new grid.  A grid properties dialog will appear, and allow you to set grid properties ahead of creating the file.


Figure 3-2: Grid Properties.

If you pick the [Agent] button and select a new agent, Columns and Rows will be ignored.  For example, if you choose the Desktop agent, you will get a grid with a single column called "Text".

To create a new grid and initialize it from existing data, use the File/Open Data command or Agent's Data window rather than the New Grid command.

If you are creating a grid that will link to new data, for example a new .txt file using the Desktop agent, it may be easier use Open With Properties from the Data window's File tab.  Context menus in the Data window, and the Open Data command allows the agent to more completely initialize the data link than using the New Grid command.

The Always Show Text Values choice in the Grid Properties dialog will cause the grid to disable all column type conversion and special cell controls.  Checkboxes, Calendar controls, and Numeric conversions will be disabled if Always Show Text Values is checked on.

 


Cell Editing

To begin editing a cell, double click the cell to enter edit mode with the cell contents selected.  The Edit/Cell menu offers to start edit mode with alternate selections, and a Memo edit dialog is especially useful for long values or multi-line cells. Cell contained line breaks (Cr+Lf) are only visible when a cell is in edit mode.

Within the memo edit dialog, .txt files may be imported or exported. For binary cell values, memo edit provides  Binary support with bracketed hex codes.  Binary .bin files may be imported or exported from the edit dialog.

The data type of Zero:  Blank, Nothing, Null.

A standard Delete will leave a Blank, which is an empty string.  You can also set a cell to Nothing, which means that no data will be written for that cell during a Write Data.

When a cell is read from data, the light red color indicates a NULL.  Nothing (blue color) value will never be read from data.

If Always Show Text Values is checked in the Grid Properties dialog, (Nothing) and (Null) will appear rather than color.

 


Undo

Most edits made to grid cells are undoable.  Commands that affect the grid as a whole, or through script, are usually not undoable.  In situations where you make an edit change to many cells at once, you may wish to disable the undo feature.  Disabling undo allows the application to destroy old cell values permanently.

 


Selection

The grid supports multiple cell selection.  Holding the Shift key in combination with a mouse click extends the selection.  Holding Ctrl toggles a cell selection.  The Grid/Select menu offers selection shortcuts, including the ability to select by matching a value using choices in Grid/Select/Find.

 


Data Commands

These commands provide for bulk manipulation of values in the grid.   Sort, Group, and Filter act on a single grid.  Join imports from a second grid.  Copy creates a new grid.  With the exception of Copy, only the currently active grid will be modified. 

Sort, Filter and Group commands will use the current cell to identify a Sort, Filter and Group column respectively. 

Group and Filter clear values from the grid.  A choice can be made to delete, or clear (make blank) values that get removed.  Removed values can be cut to the clipboard.

Sort, Group, Join and Filter act on the current selection.  Picking Entire Row and Entire Column in the Selection group of the command dialog,  as shown in figure 3-3, extends the selection to all rows, and all columns.  This provides a shortcut to manually selecting an entire column or the entire grid. 

There is a selection-related restriction where rows would be deleted.  If rows are to be deleted, such as with the Filter or Group commands, Entire Row and Entire Column must also be selected.  The OK button should disable whenever this requirement is not met.


Figure 3-3: Join Customer columns into Invoice.

Like the Sql select statement, the Join command is powerful, and a bit complex.  To help, a detailed description of the proposed command is displayed, as in figure 3-3 above.

The Relation join type requires that a key column be identified.  If a key column is identified, rows with identical key values can be matched.  The Overlay join type assumes natural order, effectively making row number the key value.  The Append type does not use a key, because all values are added to the bottom of the grid.

If Copy Matching Rows is selected as an action, cell values will be overwritten from the second table.  If Nonmatching rows are included, rows with unmatched keys will be appended.  Columns in the second table that do not exist in the selected table will be added if Add Columns is selected.

If neither Include Nonmatching Rows, nor Add Columns is selected as an action, the grid size (number of columns, number of rows) cannot change.

Data commands cannot be undone.

The join command does not support composite keys.

Editorial comment for those familiar with Sql.  Use of Sql syntax as it appears in the join dialog is intended for descriptive purposes only.  An Sql command is not executed, and descriptive liberties were taken o_O.

Script commands act on the entire grid, thus assuming entire row and entire column are selected.

 


Printing

Reporting features are limited to WYSIWYG.  Fonts, borders and colors selected for the grid document on screen will also appear in print.

 

Please see Columns, Formulas and Agents for additional help regarding the contents and display of Flask Grid Files (*.dfg).

 


Data Flask Copyright © 2006 Interscape Corporation