Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid can't find SQL Cursor
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00304561
Message ID:
00306089
Views:
33
>It seems to me that Grids Initialise differently in VFP6 to VFP5. In 5 I often had to put the fields in the Column.controlsource property, or the Column.textbox.controlsource property to get the grid to display properly. This means to that the order of selection of fields in the cursor is not important, because the column can be set to whatever field is desired.
>
>But it seems to me that in 6 the column initialises before the grid and if the cursor is referred to either in the column or a textbox in the column, then an error occurs. This means that columns either have to be set programatically or else the order of fields in the cursor must correspond to the fields I wish to display in the grid, because the column.controlsource and column.textbox.controlsource are empty and the grid fills directly from the grid.recordsource

Something has definitely changed in the way grids initialize from 5 to 6. I had a problem like yours, but I was able to fix it easily enough, I recall. One way is, as you say, by setting the column sources at runtime (try grid Init), or not at all, in some cases, when fields and columns are aligned. Another way, I believe, was by removing the DBC from the project and opening it manually.

Watchout for using the "no controlsource" method. It may appear to work fine, but if you allow column moving, and do refresh of grid source, you can wind up with data in the the wrong columns if user moves columns around :)
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform