Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing/setting grid recordsource on the fly
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Changing/setting grid recordsource on the fly
Miscellaneous
Thread ID:
00735248
Message ID:
00735248
Views:
33
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
Kevin Emmrich
www.jkt9000.com
Next
Reply
Map
View

Click here to load this message in the networking platform