Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you tie a Grid to a cursor?
Message
From
24/10/2007 16:27:10
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
24/10/2007 16:19:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
01263332
Message ID:
01263335
Views:
12
>I've used grids with tables and views (both local & remote) without any problem but now I want to create a grid that is tied to a cursor that I created on the fly with "CREATE CURSOR." I can't seem to make it work. I've name the cursor "Temp" and am selecting the datasourcetype/datasource as "Alias/Temp" and the columns all reference temp.column_names. I can select and BROWSE the grid and see the records but when I try and refresh the grid it just comes up blank. How do it tie the two together?
>
>Thanks,
>Robert

Create the cursor in load and you should be all well. Grid would come up blank (all white) when there is an error in one of column expressions. You can play with the cursor safely if in between you set grid's recordsource to empty string:

grid.recordsource = ""
*...
grid.recordsource = "temp"

However if you're working with cursors why not simply making it the recordsource from the start (RecordsourceType = 4 and RecordSource = whatever your SQL is).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform