Knowledge Base

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

Article ID: 130354

Article Last Modified on 2/11/2000


APPLIES TO


This article was previously published under Q130354

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 query words: VFoxWin ThisFormSet

Keywords: kbcode KB130354