DroidDB Tip of the Month

DroidDB® Tip for December 2012

Navigational Grid Control

A grid control can display records in another table that are related to the current record. For example, you may be on an COMPANY form and the grid would display people in that company.

Alternatively, a grid can show all the records in the form's underying table. For example, you may be on a PERSON form and the grid would display the current PERSON as well as the other people.

In the latter case, you might want the grid to be "navigational". A navigational grid allows the end user to select an entry in the grid and have the form move to that record. Say you have a table called PERSON where each record in the PERSON table has a unique PERSON_ID (which is an indexed column). Here's how to create a navigational grid control:

  1. If you haven't already, create a form (FILE | NEW FORM) built on top of the PERSON table.
  2. Create a macro to position to the new record. Select EDIT | MACRO/EVENTS. When DroidDB asks you for a macro name, enter "GRID SEARCH" (click the NEW button if you need to get the prompt). Create a macro with the following steps:
         Step 1: SORT BY: set "Col" to PERSON_ID
         Step 2: RECORD | SEARCH: set "Arg" to @var(34)
    Click CLOSE to close the macro editor.
  3. Create your grid control. When asked to "Select the search key", select "Show all records" and press OK. In the properties in the lower right, in the "Set...to current..." settings, set @var(34) to current PERSON_ID.
  4. Still in the properties of the grid control, click the "Events" button. Set the "Changed" event to "GRID SEARCH".

 

Back to List »

Visit our store

Top rated! I needed a solid database application development tool for mobile devices. I chose DroidDB for Android OS because it provided a way to get a strong product to market quickly. DroidDB is relational, gives me control over form layout, handles macros, and supports events. It works on all Android versions I have tried and is a great companion product to SYWARE’s VisualCE.

Mark Read, President
SyntegraTech, Inc.

signup for our newsletter