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
Miscellaneous
Thread ID:
00735248
Message ID:
00735368
Views:
7
Try following:
this.grdRequirements.recordsource = ""
this.grdRequirements.recordsourcetype = 1
thisform.grdRequirements.ColumnCount=-1
this.grdRequirements.recordsource = "csrRequiredClasess"
>In addition to what John said, look to "VFP Grids Part I" article here, where this problem explained in detail.
>
>Interesting set of articles. Actually it seems that I want reconstruction! I tried the following:
>
>
>if type("thisform.pgfwiz.page3.grdRequirements") = "O"
>    thisform.pgfwiz.page3.removeobject("grdRequirements")
>endif
>thisform.pgfwiz.page3.AddObject('grdRequirements','Grid')
>this.grdRequirements.recordsource = "csrRequiredClasess"
>this.grdRequirements.recordsourcetype = 1
>this.grdRequirements.left 	= 2
>this.grdRequirements.height 	= 252
>this.grdRequirements.width 	= 492
>this.grdRequirements.visible	= .t.
>this.grdRequirements.refresh()
>
>
>This brings up a grid with the correct headers -- but no data is present and all the delete markers are darkened. The underlying cursor has 3 records in it. By the way, I am using VFP 6 in this situation.
>
>Thanks,
>
>Kevin
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform