General information
Category:
Installation, Setup and Configuration
>I have several comboboxes in the grid (and all text/combo are labeled as Text1/Combo1). I have ClickEvent in the Text1 that brings the Combo1 in action. The problem is that the data of the Combo1 overlaps the "actual" data of the Text1 and those two data differs, which will confuse the users. I want to fix that by doing something like the following:
>
>*(just a make up variable name - mrp - for move record pointer)
>mrp = This.Parent.Text1 && (which would be auth.authtype)
>SELECT authtype
>LOCATE FOR mrp
>SELECT auth
>
>But it doesn't work (that way). Where do I put this? Why not in Combo1's Init (won't work)? Do I have to go by RECNO() or something? Let me put the following so you can see what's happening:
>
>Column3's CurrentControl: auth.authtype
>Text1's ControlSource: auth.authtype
>Combo1's ControlSource: authtype.authtype
>
>Text1's ClickEvent:
>IF ThisForm.Grid1.ReadOnly = .F.
> This.Parent.CurrentControl = "Combo1"
>ENDIF
>
>Combo1's LostFocus:
>This.Parent.CurrentControl = "Text1"
>
>Save's Click:
>snip
>=TableUpdate(.T.)
I think the problem here is that you are in the textbox when you set the currentcontroll to the combo. So the activecontroll is still the textbox.
You can try to set the fous outside of the grid, then change the currentcontrol and then set the focus to the combo, but i don't know if that works. Also look out, where setting focus of the grid may result in changing workareas
Previous
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