Set Grid column focus

johndanter

johndanter

Legendary Poster
Hi all

I have a screen that has a pre-populated grid of data for the user.
They are loaded from another table as insert grid buffer records. All works fine

but.....the cursor is on the last grid row

Does anyone know of a way to make a screens focus start in a pre-populated grid and the 3rd column in the grid. 1 -2 are disabled

This works, but I need the 3rd column
Get Grid Row(FC Grid, "1")

A simple solution would be to make the 1st column the input column, but if I can jump to a specific column.....great :)

Thanks

John
 
Last edited:
It is going to the last row because of the insert grid buffer system function . If you debug you will notice , once the grid buffer ER is done in whichever event, after that event is done , then for every row inserted , it fires the row is entered , row is exited , row is entered and so on and then the focus is on the last line where row is entered but row has not been exited yet . If there are 15 rows it will run for all rows and focus will be on 15th row .

There is a system function change row selection and that can help . You can provide the row # as 1 , and change row selection will work and will always highlight and blink on the first editable grid column in the row .
 
Thanks for you reply, but I do that anyway (Get Grid Row(FC Grid, "1")
And that works fine. I can get the cursor to go back to the first line, that's not the issue

The issue is I need to the cursor to jump to a specific column

It's column focus I'm after, not row focus
 
Hi John,

How about creating a dummy input column on the left your actual column and then hiding the dummy column just before the grid is displayed?

I think I did something similar in the past which worked.

Cheers,

Neal
 
Last edited:
Back
Top