Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing Comboboxes in a Grid
Message
From
23/02/1998 17:48:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00080550
Message ID:
00080606
Views:
18
>I have a combobox in a grid column with the following:
>
>MyGrid.Column2.cboObject.RowSourceType=Array
>MyGrid.Column2.cboObject.RowSource=myArray
>
>The array has initialy some lines, by other means of the grid I modify MyArray inserting more lines to it, then when I go back to the grid and try to choose one of those new lines, they don't show in the combo box.
>
>Doing MyGrid.Refresh() doesn't do the job
>
>I worked out this problem, fooling VFP making it to refresh by issuing this:
>
>MyGrid.Column2.cboObject.RowSource=MyGrid.Column2.cboObject.RowSource
>
>Does everybody have this problem?, any other solutions?

Yes, the same problem. Array source seems to have been designed for static arrays only. So for any list whose values can change at runtime, I have moved away from using arrays and build the list "on the fly" with ADDITEM and REMOVEITEM.

Your solution to the refresh problem is ingenious, though. Does it work with both combo boxes and list boxes?
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform