Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo with BoundTo = .T. in Grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00150601
Message ID:
00150652
Views:
29
>>I have similar grid working OK, right before my eyes, so ... however, I see one more indication in your replies. Character-integer combo should work Ok, but it might be that your grid itself got corrupted. I saw two times in my VFP experience this mysterious grid bug: when cell gets a focus it becomes empty. I tried twice to debug this situation and had to kill the grid completely and rebuilding from scratch and it worked Ok. I understand that it looks like fairy tale, but it was really so. The interesting part of my experience was that any normal grid dropped to this from became bugged at once, i.e. something corrupted on form level, and form itself should be rebuilt from scratch.
<<

PROBLEM SOLVED! -- Workaround anyway.
I solved the problem another way. I added a column to my lookup cursor with the key defined as n(12,2). So now my lookup cursor has 3 columns, the descr, the integer key and the numeric key. In the GotFocus of the Combo I change the BoundColumn to 3. In the LostFocus of the Combo I change the BoundColum back to 2.

I, too have been bitten by the corrupt form/class..... That is why I created the test program I submitted in my first message. Out of curiosity, did you try that program??

Just to make sure I understand your suggestion properly.
In a grid, the ControlSource for the column/combo is an integer.
The RowSource for the Combo is a Character.
This ListIndex does not equal the BoundColumn value.
BoundTo is .T.
The proper values show up for you whether or not the combo has focus?

Would you mind posting a ClassBrowser output or something detailing your solution? I hate to leave things like this unresolved, especially since my solution seems SO kludgey. I will also create another new form using my data and try again.

Thanks for your help.
Bill
Bill Armbrecht
VFP MCP
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform