Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids & CursorAdapter CursorFill()
Message
From
04/01/2011 16:04:27
 
 
To
04/01/2011 11:22:15
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01494587
Message ID:
01494672
Views:
119
Mike,

Hi Mike. So which one is the "safe select" way?

This:
myGrid.RecordSource = ""   && use empty string instead of using a temp cursor alias with d same structure 
myCA.CursorFill()
myGrid.RecordSource = myCA.Alias
Or this:
myGrid.RecordSource = "Tempdata"   && Tempdata has exact same structure as myCA.Alias
myCA.CursorFill()
myGrid.RecordSource = myCA.Alias
I have been employing the second one ever since with success. It all went beserk when I decided NOT to have all the fields in the CA shown in the grid. It loads up well upon Init(). But upon encountering CursorFill(), it shows the same number of columns as before, albeit different column content.

For example, if CA has fields A, B, C, D, E, but the grid only shows fields A, C, D. After 2nd CursorFill, it will show fields A, B, C, and not A, C, D.

FYI, the columns are created programmatically via a table containing metadata of fields A, C, D - those that are to be show on grid.

Dennis
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform