FIX: GRID: Scrollbars Disabled When ColumnCount Specified

Last reviewed: February 20, 1997
Article ID: Q147572
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b

SYMPTOMS

Scrollbars on a grid object are visible but disabled even though there are enough records in the table to expect working scrollbars.

CAUSE

The ColumnCount property of the grid object has been set to a number greater than -1 in design mode and the RecordSource property has been left empty.

WORKAROUND

Leave the ColumnCount property value at -1 and set it programmatically once the form has been instantiated.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Create a new form, and place a grid and command button on it.

  2. In the Click event of the command button, add the following code:

          USE customer
    

          ThisForm.Grid1.ColumnCount = 3
          ThisForm.Grid1.RecordSource = "customer"
          ThisForm.Grid1.Column1.ControlSource = "customer.company"
          ThisForm.Grid1.Column2.ControlSource = "customer.contact"
          ThisForm.Grid1.Column3.ControlSource = "customer.country"
    

  3. Run the form, and click the command button. Notice that the scrollbars are disabled when they should be enabled.


KBCategory: kbprg kbbuglist kbfixlist
KBSubcategory: FxprgGrid VFoxWin buglist3.00 buglist3.00b fixlist5.00
Additional reference words: 3.00 3.00b


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: February 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.