Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing/setting grid recordsource on the fly
Message
From
23/12/2002 11:32:21
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00735248
Message ID:
00735404
Views:
7
Kevin,

Another suggestion that I did no see is to use a cursor for the recordsource and then you can zap the cursor and append the data you want ot display.

>Hello,
>
>I am trying to set a Grid's recordsource on the fly and redisplay and I can't seem to do it. I have a three page form wizard, where on pages 1 and 2 I collect data and then on page three I create a cursor based on the data collected. Page 3 has a blank grid object on it with no alias defined. In the page3.Activate() section I run a SQL query and then try to reset the grid by doing:
>
>
>this.grdRequirements.recordsource = "csrRequiredClasess"
>this.grdRequirements.recordsourcetype = 1  && alias()
>this.grdRequirements.refresh()
>
>
>What happens is that the grid just seems to show the field names from (I guess) whatever alias() was open when the grid was first instantiated.
>
>Do I need to create the grid only the fly or are there commands that allow me to reset the recordsource and redisplay?
>
>Thanks,
>
>Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform