PRB: GRID.COLUMN() Gives "Property COLUMN is not Found" Error

ID: Q130354

3.00 WINDOWS

   kbprb

The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

When you issue a command similar to the following to change the property of Grid Column(s), you receive an "Property COLUMN is not found." error message.

   ThisForm.Grid1.Column(<n>).<Property>[=Setting]

CAUSE

The Grid property is spelled Columns, not Column.

RESOLUTION

To access the properties of a particular column in a grid, use the Columns property of the grid as in this example"

   ThisForm.Grid1.Columns(<n>).<Property>[=Setting]

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

1. Create a form.

2. Add a grid to the form that has five columns.

3. Add a command button to the form, and place the following code in its

   click event:

   for i=3 to 5
      thisform.grid1.column(i).width=10
   endfor

4. Run the screen, and click the command button button to see the "Unknown
   Member Column" error message.

To make the click event code work, change the code to this:

   for i=3 to 5
      thisform.grid1.columns(i).width=10
   endfor

Additional reference words: 3.00 VFoxWin ThisFormSet
KBCategory:    kbprb
KBSubcategory: FxtoolFormdes
Keywords          : kbcode FxtoolFormdes 
Version           : 3.00
Platform          : WINDOWS


Last Reviewed: May 22, 1998
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.