>You CAN base a grid on an array....sort of.
>
>Say you have any array myarray[4,3] that has four rows and three columns and you want to display the values in your grid. Place the following code in the load of your form:
>
>create cursor dummy (du_rec i)
>
>if alen(myarray,1) > 0
> for lncnt = 1 to alen(myarray,1)
> insert into dummy (lncnt)
> endfor
>else
> insert into dummy (1)
>endif
>
>For the grid, set the RecordSourceType to alias and the RecordSource to dummy (or whatever you call the cursor).
>
>Set the individual column controlsources like this:
>
>MyGrid.Column1.ControlSource = "myarray[dummy.du_rec,1]"
>MyGrid.Column2.ControlSource = "myarray[dummy.du_rec,2]"
>MyGrid.Column3.ControlSource = "myarray[dummy.du_rec,3]"
>
>Of course you can set all the grid properties interactively in the form or class designer so all you'll need to code is the load event which populates the cursor with the dummy records. Now you have a grid which reads from an array!
>
>Hope this helps,
>
>
>-JT
Jeff,
Are you sure this would work ? An array could hold much different types of data in indiviual elements. Say my [2,3] array look like this :
aDummy[1,1] = "Hello1"
aDummy[1,2] = "Hello2"
aDummy[1,3] = "Hello3"
aDummy[2,1] = .f.
aDummy[2,2] = 1
aDummy[2,3] = {1/1/1999}
or even an object ref.
Second it sounds like you're trying to set indiviual cell.controlsources. Does it really work.
Cetin