Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying a cursor with a grid
Message
From
16/12/1997 01:15:40
 
 
To
15/12/1997 16:53:47
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00066046
Message ID:
00066120
Views:
26
>>Regardless what I put for the controlsource for each column, my grid always displays the first field of the cursor first, the second field second and so on. What property am I missing that allows me to specify the contents of a column besides controlsource. By the way, it works fine when I display a table instead of a cursor, and I am referencing the fields as 'MyCursor.Field1' in the control source property of the column.
>>-- Rick
>
>If you set or reset the grid's recordsource at runtime, the grid's column's source will be overwritten with the fields in the cursor. To set them specifically, you have have to re-specify them in code, after you set the recordsourece for the grid.
Rick.
I don't know exactly what "re-specify them in code" means (I think Eric means the same as what I'm about to say but...) but all you have to do is make sure when you create/recreate the cursor in code to specify the fields in the way you want them to appear. For instance, if you want fields1, field2, field4 (skipped field3) to appear make sure when you issure your SELECT statement to retrieve the fields in that order. You could also retrieve more fields than you have columns in the grid (I usually retrieve the pkey fields that are not to be displayed) and they simply will not show.

HTH
John.
It's "my" world. You're just living in it.
Previous
Reply
Map
View

Click here to load this message in the networking platform