Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
F--king Grids! Please help!
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00007964
Message ID:
00007969
Views:
40
>I really had no idea how bad the bugs are when trying to use a grid with a view. It's the classic "ReQuery and my grid gets f--ked problem", but this time I can't solve it. Here's what I'm trying to do.
>
>Using a view, select some records form a larger table.
>Using a grid, display only SOME of the fields in that view. You see, this seems to be the problem. That is, the fields in the view don't exactly match (in order) the way I've set ControlSource for the grid columns. The grid instead IS DESIGNED to display fields 6, 4, 2, 7, and 8 from the view in that order.
>
>No matter what I try, whenever I reset the value of RecordSource for the grid, the ControlSource for each column in the grid is ALWAYS reset according to the physical order of ALL fields in the view. Result: Grid tries to show, from left to right, fields 1, 2, 3, etc., from the view. This is at runtime, not design time!!
>
>I have tried this old trick with no luck.
>RecordSource=""
>then Requery()
>then RecordSource="Viewname"
>
>With this technique, the grid's visual characteristics are maintained, but the ControlSource for EVERY GRID COLUMN is reset as described above. The same thing happens if I set Bound to False and work with the ControlSource in the grid cell rather than the grid column.
>
>Is there a way to make this work? Thanks very much!


If the COLUMN control source is set to Table.Fieldname you should be ok. Works for me.

HTH,

Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform