General information
Category:
Coding, syntax & commands
>Hi Budianto,
>
>I not sure what you mean. If you have a grid with only 4 columns visible, and you are on 5th (first 4 are not in sight) the code in the button
>
>this.parent.grid1.column3.setfocus()
>
>just automatically scrolls the grid back and sets the focus to the third column. Could you post the code in your button.Click() ?
Hi Nick,
Thanks for the reply, actually, all of the columns are visible, it's just that if I'm on the 5th to 8th column and I click the add button, the pointer is always go to the first column. This does not happend if I'm on the 1st to 4th column.
Here is my add button code :
thisform.grid1.Column3.readonly=.f.
thisform.grid1.Column4.readonly=.f.
thisform.grid1.Column5.readonly=.f.
thisform.grid1.Column6.readonly=.f.
thisform.grid1.Column7.readonly=.f.
thisform.grid1.Column8.readonly=.f.
sele MyTempGridFile
appe blank
thisform.grid1.refresh()
thisform.grid1.column3.setfocus()
For your information the 1st and 2nd column is enabled=.f. because I don't want the user to edit this column, so it should jump to the 3rd column.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only