Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid does not display all the fields
Message
From
09/10/2004 07:05:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
08/10/2004 16:14:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00950054
Message ID:
00950140
Views:
13
Sylvain,
Grids like to snap:) If a table is open and no recordsource exists then it'd pick up the one it finds first. If you don't set recordsource you could see which cursor/table it picked up.
Workaround is as Sergey noted:
WITH THIS.grdBrowse
   .ColumnCount = -1
   .RecordSource = this.cTable
endwith
Cetin


>On my form, I have a grid with ColumnCount = -1. In the Init of the form, I have the following code:
THIS.grdBrowse.RecordSource = THIS.cTable
When the form open, the grid display the table contents, but only the first 8 fields. How come?
>
>Update: I'm still interested to know why only the first 8 fields are displayed, but for the record I found a workaround:
lnFieldsCnt = AFIELDS (laFields)
>
>WITH THIS.grdBrowse
>   .ColumnCount = lnFieldsCnt
>   .RecordSource = "MyTable"
>	
>   FOR I = 1 TO lnFieldsCnt
>      .Columns (I).Header1.Caption = laFields [I, 1]
>   ENDFOR
>ENDWITH
Ç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