RE: Max Column in VFP9 Grid

Author: Tracy Pearson

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

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