Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I base a grid on an array?
Message
From
29/04/1999 13:33:57
 
 
To
29/04/1999 10:43:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00213274
Message ID:
00213551
Views:
36
Cetin,

I'm assuming that the array columns pertain to the different data elements, much like fields in a table.

If you are storing different elements within different rows in your array, then my prescribed method of mapping a grid to an array will give you some strange results.

Why wouldn't you use an array with 6 columns for your example and just store the different results in a single row?

i.e. instead of
myarray[1,1] = "TEST1"
myarray[1,2] = "TEST2"
myarray[1,3] = "TEST3"
myarray[2,1] = .f.
myarray[2,2] = date()
myarray[2,3] = 12345

you could have:
myarray[1,1] = "TEST1"
myarray[1,2] = "TEST2"
myarray[1,3] = "TEST3"
myarray[1,4] = .f.
myarray[1,5] = date()
myarray[1,6] = 12345

This way, your array-bound grid would work fine.

I know it works 'cause we have several grids in our app that are mapped to object array properties.

Regards,

-JT
Jeff Trockman, MCP
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform