Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching Data Environments Dynamically
Message
From
26/12/1998 14:58:38
Christopher Holtz
Integral Computer Services, Inc.
Rochester, New York, United States
 
 
To
26/12/1998 14:35:12
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00170498
Message ID:
00170499
Views:
15
Hi Frank,

Two things are happening here. When you switch data environments
dynamically:

1) The Rowsource of your grid will be lost and
2) You will lose the control sources of each column

It's odd that your column count changes too. I'm not aquainted
with your obitObj class. In any event, before changing your
data environment, you could set the grid's recordsource to
.Null. Now, after the data evnvironment has changed, set the
record source of the grid back to what it wa (assuming that
table exists in your new data environment).

By doing this, the grid seems to remember the control sources
for each of its columns (I don't know why... if anyone does,
I'd sure like to know).

- Chris Holtz


>I tried to switch the Data Environments dynamically by issuing the following command:
>
>ThisForm.obizObj.LoadDataEnvironment("GroupnewEnvironment")
>
>I have a cGridlist object with 2 columns defined. But after the data environment has been switched, the cGridlist.ColumnCount=0 (I lost two columns object definition). Does anybody know how to work around?
>
>Thanks in advance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform