Saving a User-modified Grid Layout

Explains a method you can use to save user-supplied grid information.

You can save and restore user modifications made to a grid layout by creating a REGISTRY-KEY property for the grid. If this property is set when the grid control is destroyed at the end of a program run or by some other means, then PHYSICAL-COLUMNS and other relevant information is stored in the registry key.

Note: Before you create the registry key, we recommend that you have defined DISPLAY-COLUMNS wit the proper number of columns for your grid. While this is not mandatory, it does ensure a successful load the first time.

Based on supported Windows releases for the 10.4.0 release of this product, the name of the registry key must be constructed as follows:

HKEY_CURRENT_USER\Software\company\product\version\...

where is a unique name for the particular grid, for example, program-name\grid-name. The full key name might be something like this:

HKEY_CURRENT_USER\Software\MyCompany\MyProduct\1.0\CUSTMAINT\Shipping Grid
Note: As of the 10.4.0 release of this software, currently supported Windows releases automatically prepend a new key with HKEY_CURRENT_USE\Software\. You should omit this from your key definition.

To load the grid settings present when the program last ran, simply set REGISTRY-KEY to the key name you created, omitting the prepended Windows text. For example:

REGISTRY-KEY = "MyCompany\MyProduct\1.0\CUSTMAINT\Shipping Grid"
Tip: If you place REGISTRY-KEY in a Screen Section definition of a grid, place it near the end of the specification. With some basic exceptions, the compiler generates property-setting code in the order seen in the source code.

When using AcuToWeb, the REGISTRY-KEY values are saved in the Local Storage of the browser. To view or delete these values:

  1. With AcuToWeb active in your browser window, press Ctrl+Shift+i.
  2. On the toolbar, select Application. This opens a menu ribbon on the left side of the window.
  3. On the menu ribbon, expand Local Storage.