Navigation:  Reference > Commands >

Data Grid List Memory Array

Print this Topic Previous pageReturn to chapter overviewNext page

 

This command activates a TTASDataGrid object on the form.  It is appropriate when you are using the data grid for an in-memory array instead of an actual file.  When you are accessing an actual file you would use WLISTF.

 

 

WLISTM f/c/eRequired - The name of the TTASDataGrid object on the form

 

SETUP This option would be used when you are first specifying the counter field, number of elements, etc.  Otherwise, you can use one of the display options below and you can reset any of the options originally set here.  When this is called the first time certain setup routines are called in the grid and need not be called again.

 

CLOSEUse this option to remove all the rows from the grid and disconnect the grid from the arrays.  This would only be used if you are going to change the columns from one WLISTM command to another.

 

COUNTER_FLD fn/v  This is the field that will be used both internally (in the grid itself) and externally (in your program) to determine which array row is being accessed.  Each time the grid returns control to your program this field will have the current array row as its value.  If this is during the SETUP process then this is Required option.

 

ACTIVE_ELEMENTS f/c/e  This is the number of rows that currently exist is the array.  This will be the number of rows displayed on the grid.    If this is during the SETUP process then this is Required option.

 

MAX_ELEMENTS f/c/e  This is the maximum number of rows for the array fields used.  Generally, this will be the number of defined array elements for the fields.  If this value isn't the same for all fields on the grid then it should be the lowest number of array elements among the fields used.

 

       NOTE:  This value must be equal to or greater than the ACTIVE_ELEMENTS value or the grid will not display the rows as you expect.  The ACTIVE_ELEMENTS value will automatically be reduced to the MAX_ELEMENTS value.

 

       NOTE:  If you are allowing the user to add rows using the grid as an entry device then this value must be more than the ACTIVE_ELEMENTS value or the program will not allow any new rows to be added.  Further, the user won't be able to add more than MAX_ELEMENTS in any case.

 

 displayREDISPLAY - Redisplay starting with the first visible row on the grid and continuing from there.

       REDISPLAYFROMTOP - Redisplay starting with the first element in the array.

       REDISPLAYFROMEND - Redisplay starting with the last element in the array.

       UPDATECURRENT - Refresh all the columns in the active row.

       REDISPLAYCURRENT - This assumes that you've changed multiple values in the array.  It will move the current selected row to the top of the visible grid and will display all the elements that come after it. NOTE:  If there are not enough rows to fill the grid and there are rows above what would normally be the top, those rows will be displayed and the nominal top will be moved down.  The row cursor will be moved down also.

       REDISPLAYACTIVE - This would be used if you have set the counter value and want to redisplay the grid based on that value.  It will be placed at the top of the visible grid and all rows that follow it will be displayed. NOTE:  If there are not enough rows to fill the grid and there are rows above what would normally be the top, those rows will be displayed and the nominal top will be moved down.  The row cursor will be moved down also.

 

 

COMMENTS

You will need to execute this command at least once to activate a TTASDataGrid.  Once that grid is active all other changes can take place due to the user moving from row to row or through the effect of the DATA_GRID command.

 

EXAMPLE

A very good example of this command is WTASDMGR.  The source file (WTASDGMGR.SRC) should be in the \TAS7 subdirectory depending on where you installed TAS Professional.

 

 

 


Page url: http://www.cassoftware.com/tas/manual/datagridlistmemoryarray.htm