Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another simple grid question
Message
 
To
28/10/1998 08:35:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00150964
Message ID:
00152177
Views:
26
>>>>I have a grid in which the RecordSourceType is "SQL Statement". I supply a RecordSource SQL string in the grids init. Can I change that RecordSource SQL sting at run time to something different? How do I get the grid to requery since it is not a view.
>>>>
>>>>Thanks
>>>
>>>You should issue:
>>>Grid.Recordsource=""
>>>Grid.Recordsource=cMynewsqlstring
>>>Grid.Refresh
>>
>>All I do is issue Grid.Recordsource=cMynewsqlstring and the grid is smart enough to do the rest :)
>
>It depends on situation (column.controlsources etc. might have to be restored) and weather :)- refresh may not fire implicitly.

Correct me if I'm wrong here, but when using an SQL statment as the record source the grid *totally ignores* the control source...so they are a non-issue. With recordsourcetype = 4 you must structure the SELECT statement to put the fields in the order of the grid columns. Grids with SQL record source types are my primary tool for lookup routines, and I've never had to refresh one for it to trigger...I simply change the recordsource, normally via a method that fires from the interactive change event of one or more text boxes (or check boxes or combos or option groups).
Ken Sorce
Team RAD, Inc.
Rapid Application Developers
Ken@TeamRAD.com
www.teamrad.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform