Tracy
I found I had the code THISFORM.GRID1.RecordSource=(THISFORM.ALIASIS)
Even though I had not changed the contents of the source table.
When that executes it displays the columns in the order they appear in the
table structure. I have never noticed this as I routinely create a cursor
named placeholder in the load event so that later I can set the
controlsource to placeholder and then do a select into the original filename
and then set it back. I guess I always had the field structure in the order
I wanted to display.
Thanks for your clue
When I remarked the recordsource out every thing appeared correctly.
I will have to pay more attention to that.
Thanks Jerry  

-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Tracy Pearson
Sent: Thursday, January 31, 2013 9:20 AM
To: [email protected]
Subject: RE: Max Column in VFP9 Grid

jerry foote wrote on 2013-01-31: 
>  Does any one know the max number of columns that be placed in a VFP9
Grid.
>  
>  I'm having a problem when I include over 21 columns. In design mode
>  everything looks good I have the Column controlsource and the text
>  controlsource set to one of the fields in my table, but when running the
>  form another field appears in the grid. I suspend the form and examine
the
>  column and text controlsource and both are set to the field that is
>  displayed .not the same as what I originally set them to or what they are
>  when I view in design mood.
>  
>  Any insight as to what is going on.
>  
>  Thanks Jerry
> 

Jerry,

This may happen if the cursor that you attach to the grid is recreated after
it has been attached.

I will many times make the cursor for the grid in the FORM.LOAD event. Then
a custom method will fill the cursor.

Select * from TABLE into TEMPGRIDCURSOR
Select GRIDCURSOR
ZAP
Append from dbf("TEMPGRIDCURSOR")
Use in select("TEMPGRIDCURSOR")

This prevents the behavior you are seeing.

Others, will set the Grid.RecordSource to "" before selecting into the
GRIDCURSOR which recreates the cursor, then sets Grid.RecordSource back.
This happens a few times in my code as well. It just doesn't feel right to
me, so I have adopted the first way.

Tracy Pearson
PowerChurch Software


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/39D82B010B824C1F89BD825C4EEBDEA9@jerryfootePC
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to