Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying properties from one object to another ?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Copying properties from one object to another ?
Miscellaneous
Thread ID:
00479569
Message ID:
00479569
Views:
47
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.
Next
Reply
Map
View

Click here to load this message in the networking platform