>I have a grid on a form in which I want to display all fields of the recordsource, so I have set the columncount property to -1 via. the property-sheet. The recordsource is a .dbf with 30 fields, but the grid is only displaying the first 16 fields.
>
>In my attempts to debug the problem I have a WAIT WINDOW message in the grid.init() event, but the columncount is already 16 at that stage. Is there any where earlier in the instantiation process that I can trap the property value?
>
>Does VFP have a limit as to how many fields it will display in a grid with columncount=-1?
>
>Any ideas would be appreciated. I am using VFP8 SP1.
>
>Regards,
>Alan
No Limits
oForm = CREATEOBJECT([Form1])
oForm.Show()
READ EVENTS
DEFINE CLASS Form1 AS form
Top = 0
Left = 0
Height = 464
Width = 682
DoCreate = .T.
Name = "form1"
ADD OBJECT grid1 AS grid WITH ;
Height = 258, ;
Left = 14, ;
Top = 162, ;
Width = 593, ;
Name = "Grid1"
PROCEDURE Load
lcSql =[CREATE CURSOR crsGrid (Field1 I]
FOR asd = 2 TO 255
lcSql = lcSql + [, Field]+TRANSFORM(asd)+[ I]
NEXT
lcSql = lcSql + [)]
&lcSql
FOR asd = 2 TO 40
APPEND BLANK
NEXT
GO TOP
ENDPROC
PROCEDURE Destroy
CLEAR EVENTS
ENDPROC
ENDDEFINE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.