Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid wont show cursor data for specific fields
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00241781
Message ID:
00241814
Views:
10
>I have created a container class for looking up inventory items from a table and adding them to a grid.
>
>I created a CURSOR called order1 which is a structure copy of the invdetail file.
>
>select 0
>use invdetail shared
>xar=afields(xarray,"invdetail")
>create cursor order1 from array xarray
>
>Then I created a grid and set the properties of it to show only a few of the fields in the Cursor.
>
>this.addobject("grid1", "grid")
>this.grid1.left=12
>this.grid1.top=200
>this.grid1.width=612
>this.grid1.height=250
>this.grid1.visible=.t.
>
>The proeerties are default set as
>recordsourcetype=alias
>recordsource="order1"
>
>I have tried it several ways and get the same results...the grid will not show any data even though there is data in the cursor. When I remove the recordsourctyoe and recordsource it show the entire cursor AND the fields in it.
>
>I simply want to show 4 of the 15 fields of the cursor in the grid. Any help is greatly appreciated.

You may need to do most of this at runtime, working that way. Set the recordsource = '' (empty string) in grid Init().

Then set recordsource to cursor and 4 column controlsources after you ADDOBJECT (and don't forget to Refresh grid)...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform