Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set focus to a grid column
Message
 
To
08/05/1996 18:37:55
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00001164
Message ID:
00001210
Views:
54
>When having the focus on a control in the form and
>want to set the focus in the grid, I write
>ThisForm.MyGrid.SetFocus() and it works. But, when
>I want to set the focus to a column it doesn't
>work even if I write
>ThisForm.MyGrid.Column1.SetFocus(). The focus
>always returns to the last column it was.

This is code in an m_action method on a command button I
use, I have no problem setting focus back to the column
in a grid, the problem came from setting focus from inside
a command button because of it's default behavior, thus
the NODEFAULT command.

NoDefault
INSERT INTO dro_tbl (dro_donm,dro_dorv,dro_rdnm,dro_rdrv,dro_qtty) VALUES ;
(dma_tbl.dma_donm, dma_tbl.dma_dorv,This.Parent.TxtAddDro_rdnm.Value,This.Parent.TxtAddDro_rdrv.Value," ")
This.Parent.TxtAdddro_rdnm.Value = ' '
This.Parent.TxtAdddro_rdrv.Value = ' '
This.Caption = "<<==Add What?"
This.Enabled = .F.
Thisform.Pageframe1.PagDrodata.Refresh
This.Parent.Grid1.Column3.SetFocus

Hope this helps...
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform