Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids & CursorAdapter CursorFill()
Message
From
07/01/2011 12:27:22
 
 
To
07/01/2011 00:53:56
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:
01495159
Views:
140
If creating a simple example from your code base is possible, others could look and play with it.
At least for me such an approach is better - in 10 days a couple of H of train usage could be used.

perhaps others would also prefer "hands on"

thomas



>Everything is in the Init event since there is nothing to do in Load. The form class basically accepts a CA object parameter which serves as the cursor that populates the grid. The Init also calls a form method to programatically construct each column of the grid based on the cursor's structure. The form also has other controls to either filter or change the order of the cursor.
>
>Previously, whatever fields the cursor has is displayed on the grid. This works like a charm.
>
>I then decided to refine it further by allowing only a subset of the fields be displayed on the grid. This is where the 'nightmare' began. The grid deconstructs. That is why I shifted to safe select - use a temporary cursor which has the subset of fields as the RecordSource. So, everytime the CA CursorFill() is called, we ZAP the Tempcursor and APPEND FROM DBF( CA.Alias ). All the data shows up correctly when you view in the Data Session window, only thing is, the grid does not display the records. One needs to either keypress UP or DOWN for the rows to appear. Thats why for now, I issue KEYBOARD '{UPARROW}' as a remedy, albeit poor one.
>
>Thanks for your ideas.
Previous
Reply
Map
View

Click here to load this message in the networking platform