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
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
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/79651E49BE494583B0A317D3DF3ACA6F@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.
On Thu, Jan 31, 2013, at 03:09 PM, jerry foote wrote:
> Does any one know the max number of columns that be placed in a VFP9
> Grid.
>
I'd say 254 but I'd be guessing.
I tend to build them programmatically to save headaches like this.
_______________________________________________
Post Messages to: ProFox@leafe.com
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/1359645217.1420.140661185080737.7F329F75@webmail.messagingengine.com
** 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.
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
_______________________________________________
Post Messages to: ProFox@leafe.com
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/000301cdffc6$6f2fbf20$4d8f3d60$@powerchurch.com
** 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.
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:profox-bounces@leafe.com] On Behalf Of Tracy Pearson
Sent: Thursday, January 31, 2013 9:20 AM
To: profox@leafe.com
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: ProFox@leafe.com
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.
On 1/31/2013 10:47 AM, jerry foote wrote:
<snipped>
> When I remarked the recordsource out <snipped>
Wow...that makes me think of good ol' BASIC days with the REM before
those lines!!!
--
Mike Babcock, MCP
MB Software Solutions, LLC
President, Chief Software Architect
http://mbsoftwaresolutions.com
_______________________________________________
Post Messages to: ProFox@leafe.com
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/510A9A64.2060703@mbsoftwaresolutions.com
** 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.
At 08:23 2013-01-31, "MB Software Solutions,
LLC" <mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
>On 1/31/2013 10:47 AM, jerry foote wrote:
><snipped>
>>When I remarked the recordsource out <snipped>
>
>Wow...that makes me think of good ol' BASIC days with the REM before
>those lines!!!
What about good ol' BASIC days with the ' before those lines?
^ ^
OK, OK, I confess. I still use BASIC. I have some utilities
that I use in my VFP programming. One generates a bunch of the form
code I use. Another is a search utility. The others are minor. The
beauty of them is that they do about what I need, and if not, I have
the source.
Why not write them in VFP? 1) VFP has some overhead I prefer
to avoid. 2) I can use these utilities while VFP is busy, say
displaying an error message about how I screwed up (and now need to
run the utility).
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: ProFox@leafe.com
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/20130131174129.JXXC1665.priv-edtnes28.telusplanet.net@edtncm04
** 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.