Index
2013-01-31 09:09jerry foote : Max Column in VFP9 Grid
2013-01-31 09:13Alan Bourke : Re: Max Column in VFP9 Grid
2013-01-31 09:19Tracy Pearson : RE: Max Column in VFP9 Grid
2013-01-31 09:47jerry foote : RE: Max Column in VFP9 Grid
2013-01-31 10:23MB Software Solutions, LLC : Re: Max Column in VFP9 Grid
2013-01-31 11:41Gene Wirchenko : Re: Max Column in VFP9 Grid
Back to top
Max Column in VFP9 Grid

Author: jerry foote

Posted: 2013-01-31 09:09:01   Link

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.

©2013 jerry foote
Back to top
Re: Max Column in VFP9 Grid

Author: Alan Bourke

Posted: 2013-01-31 09:13:37   Link

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.

©2013 Alan Bourke
Back to top
RE: Max Column in VFP9 Grid

Author: Tracy Pearson

Posted: 2013-01-31 09:19:59   Link

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.

©2013 Tracy Pearson
Back to top
RE: Max Column in VFP9 Grid

Author: jerry foote

Posted: 2013-01-31 09:47:14   Link

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.

©2013 jerry foote
Back to top
Re: Max Column in VFP9 Grid

Author: MB Software Solutions, LLC

Posted: 2013-01-31 10:23:00   Link

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

http://fabmate.com

http://twitter.com/mbabcock16

_______________________________________________

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.

©2013 MB Software Solutions, LLC
Back to top
Re: Max Column in VFP9 Grid

Author: Gene Wirchenko

Posted: 2013-01-31 11:41:18   Link

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.

©2013 Gene Wirchenko