Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching tables in a grid
Message
From
04/04/2002 04:21:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/04/2002 17:59:36
Michael Ouellette
Australian Technical Services (VIC) Pty
Australia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00640645
Message ID:
00640747
Views:
13
>I have 10 identical tables that I use to store costings for different customers
>
>I set up a form with an incremental search field and a grid which displays
>the record found.
>The table name is x which I open as an alias (master)
>This initial table is opened in the dataenvironment
>
>I have a dropdown which lists the other identical tables.
>In the valid I close master then open a new table as master.
>When I close the table & open another table, the grid
>goes completely blank. ( I issue thisform.grid1.refresh() )
>
>If I say thisform.grid1.columns=10 and
>thisform.grid1.recordsource="master"
>the grid is recreated but not in the original format( header caption, width) and the doubleclick code is gone.
>
>Any ideas on how to switch tables on the fly?
>
>TIA

Michael,
With identical structures and column order matching field orders changing on the fly is a snap :
with myGrid
 .Recordsource = '' && Key to keep format
 .Recordsource = 'MyNewSource'
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform