skip to main content

Controls Reference : GRID : Properties : File-Pos

File-Pos
The content of this numeric property is the grid's record number that matches the current file position in the corresponding data file. The Paged style must be set.
The File-Pos value will usually be either the last visible record in the grid or the first non-heading record visible.
For example, suppose that you have a grid with five lines and no headings. When you are moving forward through the file, File-Pos will usually be '5', matching the last record added to the grid.
If you click the Next Record button, the MSG-PAGED-NEXT event will indicate that only one READ NEXT is needed to retrieve the appropriate record. Instead, if you click the Previous Record button, the MSG-PAGED-PREV event will indicate that five READ PREVIOUS statements are needed to get the desired record. In this case, File-Pos will change to '1', indicating that only one READ PREVIOUS is needed to get another previous record while five READ NEXT statements are needed to get the next record.
File-Pos has three special values defined as constants in isgui.def:
The grid automatically manages File-Pos using the following rules:
The handling described above will correctly handle grids whose data is coming from an indexed data file if you move the file's record pointer only in response to grid events. In cases in which you move the file's record pointer independent of a grid request, you will need to do one of the following:
 
Example - Enquire the file-pos property from a paged grid
procedure division.
  inquire screen-1-gr-2 file-pos ws-fp
  display message ws-fp

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left