class_="buildgrid"

Using <widget class_="buildgrid"> provides an editable, expandable grid for entering data into a temp table.

Description

A temp table is created by this widget which is editable, copy-able, and expandable via the GUI. Additional power and functionality is available via a right-click on the buildgrid which brings up a context menu.

Syntax

<dynamic TEMPTABLE="">
    <widget name="[NAME] 
      class_="buildgrid" 
      label_="[RESULT_TABLE_NAME]" 
      width_="[INTEGER]" 
      height_="[INTEGER]" 
      savevalue_="@[SAVE]" 
      value_="@[TEMPTABLE]">
      [1010data_QUERY]
    </widget>
</dynamic>

The [1010data_QUERY] may be specified between the opening and closing tags of the <widget>. The results of the query provide data for the <widget> to display.

Attributes

columns_stretch_
Optional attribute to control column widths if the grid is wider than the natural width of all columns.
Valid values are:
none
Do not stretch the columns to fit the width. This is the default value.
last
Stretch the last column to consume the excess space in the grid.
all
Divide the excess space in the grid uniformly among the columns.
height_
Specifies the starting height of the window in which the buildgrid appears, in pixels.
label_
Accepts text that is used as a label for the widget.
name
The name of this specific widget.
savevalue_
Setting to a non-zero integer in your QuickApp (savevalue_=@mytrigger) will cause the buildgrid to trigger a save, then reset 'mytrigger' to 0
show_metadata_
When set to 1, displays metadata rows by default. The default value is 0, do not display metadata by default.
value_
Specifies that a dynamic variable will be updated with the name of the saved temp table. Right-click on the buildgrid will bring up a context menu where you can select 'Save Table' to trigger the saving mechanism.
width_
Specifies the starting width of the window in which the buildgrid appears, in pixels.

Right-Click Context Menu Options

Save Table
Triggers the saving mechanism.
Show / Hide Column Info
Reveals or closes column info cells at the top of the grid where Names, Labels, Types, Formats may be entered for each column. Available column types are 'int' 'float' 'text' (or 'i' 'f' 'a').
Note:

If column type and format are left blank, the widget will try to parse the contents and infer the appropriate formatting and data type (defaulting to text if none can be inferred).

Example: Basic Usage

A buildgrid is created with window dimensions 600 x 600. The value entered in the field is passed to the savevalue_ attribute.

<dynamic temptable="default.empty" save="0">
  <layout arrange_="h">
    <layout>
      <widget name="field" class_="field" value_="@save"/>
      <widget name="buildgrid" class_="buildgrid" value_="@temptable"
             savevalue_="@save" base_="default.empty" width_="600" height_="600"/>
    </layout>
    <layout>
      <widget name="text" class_="text" text_="{@temptable}"/>
      <widget name="grid" class_="grid" base_="{@temptable}"/>
    </layout>
  </layout>
</dynamic>
Example 1 - Buildgrid initial appearance