Information générale
Catégorie:
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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement