Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populating a grid
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01106160
Message ID:
01106227
Views:
22
This message has been marked as a message which has helped to the initial question of the thread.
>Can sombody give me some advice please. I have a cursor 'Articolhang' which is built when the the form is initialized. I would like to bind the contents of the cursor to my grid using the traditional way by selecting the grid and then entering my properties using the foxpro GUI i.e. columns = 3, recordsource = Articolhang.
>
>Here lies a problem I think when the form initializes the grid is looking for the cursor but the cursor is not built yet. Can i do it this way or after my method which creates the cursor I then have to to do something like:
>
>
>
>with this.grid1
>     .recordsource = 'Articolhang'
>     etc etc
>endwith
>
>
>
>I would really like to set the properties on the grid rather than programmatically!!
>
>I was hoping somebody could put me in the right direction
>
>Many thanks

There are two general ways of doing it.

1. You need to create your cursor in the Load event of the form. When you requery your database, select into temp cursor, zap the original [main cursor] and append into it.

2. Create your grid as a separate class. Add it in the Init of the form after you already got your cursor.

I use both methods in my forms.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform