Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying properties from one object to another ?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Copying properties from one object to another ?
Divers
Thread ID:
00479569
Message ID:
00479569
Vues:
49
We need to make two objects the same as the other object. For example we have several column in a grid we want to programming assign all the properties of the first column to all the columns. (Of course except a few properties).

What we are actually trying accomplish is that we change the RecordSource of a grid to another view instead of the initial view (the fields are exactly same in both the views). When we do this we loose all the original properties (color, methods etc) of the grid but we see the data in the grid.

I tried assign the whole object to a variable and assign the object to a reference but it did not work. I get an error .

Here is the code:

Original View in the form:
SELECT firstname,lastname FROM main into cursor mainyearly



When changing views:

loColumn = thisform.myggrid.colmn1
SELECT firstname,lastname FROM notinmain into cursor mainyearly
thisform.grdDataEntry.RecordSource = "mainyearly"
thisform.grdDataEntry.column1=loColumn
thisform.refresh


Any suggestions would be really appreciated.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform