BUG: Grid is Empty with Incorrect Column ControlSource

Last reviewed: August 6, 1997
Article ID: Q168043
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a

SYMPTOMS

Specifying an invalid column ControlSource name in a Grid results in an empty grid in Visual FoxPro 5.x. However, in Visual FoxPro 3.x, this results in the following error, which is expected:

   "Error loading File - ControlSource..., Variable "column name"
   is not found"

RESOLUTION

Check the ControlSource names in each column and make sure they are valid names.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Run the following code from a program (.PRG) file:

          SET SAFETY ON
          USE HOME()+'samples\data\customer'
          LOCAL aobj[1], ox
          CREATE FORM TEMP NOWAIT
          =ASELOBJ(aobj,1)
          ox = aobj[1]
          ox.AddObject('grid1','Grid')
          WITH ox.grid1
    
             .Recordsource = 'customer'
             .Visible = .T.
             .ColumnCount = 2
             .Column1.ControlSource = 'customer.cust_id'
    
             * Purposely put an invalid column controlsource name
             .Column2.ControlSource = 'customer.contact'
    
             * To display the Grid correctly set:
             *   .Column2.ControlSource = 'customer.Xcontact'
          ENDWITH
          KEYBOARD 'Y' CLEAR
          RELEASE WINDOW 'Form Designer'
          DO FORM temp
    
    

  2. Form shows up with an empty grid.
Keywords          : buglist5.00 FxprgGrid vfoxwin kbbuglist
Version           : 5.0 5.0a
Platform          : WINDOWS
Issue type        : kbbug


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 6, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.