Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Problem Reproduced
Message
From
02/02/1999 11:14:39
 
 
To
01/02/1999 14:07:25
Raymond Ferretti
Insurance Data Processing, Inc.
Wyncote, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00182644
Message ID:
00182953
Views:
10
Raymond, try this:

PROCEDURE MyGrid.Init
IF NOT USED('mytable')
USE mytable IN 0
ENDIF

WITH THIS
.RecordSource = 'mytable'
.Column1.ControlSource = 'mytable.field1'
.Column2.ControlSource = 'mytable.field2'
ENDWITH

SELECT mytable

ENDPROC

Sometimes (yes, it's weird and unpredictable), the grid object is build before the Load event; so if you want to play safe, either use DataEnvironment or write the grid properties on Init right after you open the table.

HTH

>I would like to know if anyone trying these steps gets the same problem I have.
>
>1) Create a form class based on form with a grid on it.
>2) create a form based on your form class.
>3) open a table in the load method.
>4) set the grid RecordSource and column ControlSource.
>5) run form.
>
>I get:
>Error loading file - record 3 etc....
>
>If I open the table in the Data Environment the form runs fine.
>
>Is this a bug in 6.0?
Previous
Reply
Map
View

Click here to load this message in the networking platform