skip to main content

Controls Reference : GRID : Properties : Search-Options

Search-Options
This property affects the way the information stored in the Grid control is searched. No search is done until the Search-Text property is set.
The argument passed to this property is the group item GRID-SEARCH-OPTIONS defined in isgui.def. Before using that item, it must be initialized with the INITIALIZE Statement. The following variables or conditions can be set to affect the search behavior:
GRID-SEARCH-FORWARDS
When set to true, the default, the information is searched forwards, otherwise the information is searched backwards.
GRID-SEARCH-WRAP
When set to true, the default, the search does not terminate when the last cell (or the first cell in the case GRID-SEARCH-FORWARDS is set to false) is reached, but automatically continues from the first (or last) cell until the starting cell is reached.
GRID-SEARCH-IGNORE-CASE
When set to true, the default, a case-insensitive search is performed.
[ GRID-SEARCH-MATCH-ANY | GRID-SEARCH-MATCH-LEADING | GRID-SEARCH-MATCH-ALL ]
[ GRID-SEARCH-VISIBLE | GRID-SEARCH-HIDDEN | GRID-SEARCH-ALL-DATA ]
GRID-SEARCH-SKIP-CURRENT
When set to true, the current cell is skipped and the search starts from the next one. The default value is true.
GRID-SEARCH-MOVES-CURSOR
When set to true, the cursor is automatically moved to the cell containing the searched text. The default value is false.
GRID-SEARCH-COLUMN
When set to a value greater than zero, the search is performed only in that column. The default value zero means that all columns are to be searched.
 
Example - Modify a grid to set the search options prior to search
working-storage section.
copy "isgui.def".
01 search-result pic 9.
procedure division.
   set grid-search-forwards     to true
   set grid-search-wrap         to true
   set grid-search-ignore-case  to true
   set grid-search-match-any    to true
   set grid-search-skip-current to false
   set grid-search-moves-cursor to true
   set grid-search-all-columns  to true
   modify h-grid, search-options grid-search-options.
   modify h-grid (1,1)
          search-text "part"
          giving search-result

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