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.