Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo's in grids
Message
From
24/12/2001 22:15:33
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
24/12/2001 21:29:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00598013
Message ID:
00598020
Views:
20
>Hi there
>
>I have a combo in a grid (work order items) and I want to display a list of people to allocate that work item to based on on a work category on the product record. Each line item can potentially have a different work category and so I need a list that is dynamic.
>
>I have no problem in constructing the select statement and when I run it outside the combo it works fine. Only problem is when I place it in my grid as a SQL statement it no work properly no more. One problem was a limitation in the size [# of chars] of the Select statement but after fixing this I still didn't get any data in the dropdown.
>
>I tried placing the select-sql statement in gotfocus but the combo losses the reference to the cursor.
>
>I tried placing the result into an array and the data gets there but does not display correctly here either. The listcount gets set the first time one accesses the dropdown to the size of array at that time and cannot be reset because it is read only.
>
>I have a working version using a select statement in gotfocus (I should perhaps use WHEN) where I test for a readwrite cursor created the first time through and then zap'n'append to that cursor from a temp cursor whilst all the time pointing my combo to the alias of the original cursor.
>
>This is clearly a dodge an I feel I must be doing something basic wrong.

Just let's check the usual suspects. When you change the parameter which should cause the rowsource of your combo to be rebuilt, do you issue a .combo.requery?

The story behind this is that the combos and listboxes maintain their private copies of their rowsources, and you got to issue a .requery to get this copy refreshed from its nominal source. You should .refresh as well (actually I've seen quite a few .refresh methods in combos which call the .requery, so you issue only one call and the other one precedes it automatically).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform