Set Focus to Cell in Grid
Posted: Tue Feb 12, 2019 3:18 am
Hopefully an easy Question:
I want to select the 1st Record in a grid and set focus to a cell in the 1st Row. In my example, the cell I want to set focus to is "GridColumn6". The code below selects the 1st record and it visually sets focus to the cell I want but I still have to click in the Cell in order to change it's value. I would like to have the value of the cell automatically selected. Thanks for your Help!
I want to select the 1st Record in a grid and set focus to a cell in the 1st Row. In my example, the cell I want to set focus to is "GridColumn6". The code below selects the 1st record and it visually sets focus to the cell I want but I still have to click in the Cell in order to change it's value. I would like to have the value of the cell automatically selected. Thanks for your Help!
Code: Select all
* Select 1st Record
Selectlist Named(#GridMain)
Set Com(#GridMain.CurrentItem) Selected(True) Focus(True) Ensurevisible(True)
Leave
Endselect
Set Com(#GridColumn6.Cell<1>.Column) Focus(True) Selected(True) Ensurevisible(True)