General information
Category:
The Mere Mortals Framework
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only