November 23, 2005, 12:59 PM
ClaudeMoving Curor to a column (row) in a Grud
Z/VM, focus 7.3.3, Maintain
Is it possible to move the cursor to a specific location on a grid?
I have a compute of the form in a case which is doing validations
Compute MntRequests.OpenRequests.CurGrdColNum = 3 ;
Where "Mntrequests" is the form name and "OpenRequests" is the grid name.
The cursor is in column 7.
I even tried refreshing the form (which I did not think was necessary).
Is it possible to move the cursor within a grid? If so what am I doing wrong?
November 28, 2005, 08:49 AM
Maintain WizardThis is the proper syntax to move the cursor to a specific row / column in a grid:
FormName.GridName.SETSCROLL(i,j);
Where FormName is the name of the form, Gridname is the name of the grid, i is the row number and j is the column number.
Please make sure that you have used the correct form and grid names in the command.
Mark
November 30, 2005, 08:45 AM
ClaudeNote: Marks solution moves the entire screen.
For example moving to column 3 makes that the left most column.
It does not move the cursor with out scrolling the screen which is what I want to do.
November 30, 2005, 11:56 AM
Maintain WizardSince you only want to move the cursor and NOT shift the columns on the screen, we need to add a second command. To do this, we have to make sure that the desired row is on the screen.
First, we will scroll down to the desired row, and then move the cursor:
Compute Form.Grid.SetScroll(Row, 1)
-* Where Row is the desired row and 1 is col 1
Compute Form.Grid.SetCursor(Row, Col)
-* Where Col is the desired column
This should do exactly what you want
Mark
December 07, 2005, 12:07 PM
ClaudeFor anyone monitoring this topic.
Mark suggestion worked.