Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setfocus to the visible first column, not the defined 1st
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Setfocus to the visible first column, not the defined 1st
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01154356
Message ID:
01154356
Views:
58
Hi all

I have a grid within a container. On click of the New button (in the same container) the focus has to set to the first column in the grid. The following code did it work, until I later added a new column to the grid. This technically last column is the visible first column so the code starts to fail.

cmdNew.Click()
DODEFAULT()

LOCAL lcCtrl

lcCtrl = THIS.PARENT.grd.Columns[1].CurrentControl
WAIT WINDOW lcctrl

THIS.PARENT.New()
THIS.PARENT.grd.COLUMNS[1].&lcCtrl..SETFOCUS()
Please advise.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Next
Reply
Map
View

Click here to load this message in the networking platform