Microsoft KB Archive/147572

= FIX: GRID: Scrollbars Disabled When ColumnCount Specified =

Article ID: 147572

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q147572



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.



Steps to Reproduce Problem
 Create a new form, and place a grid and command button on it.  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"  Run the form, and click the command button. Notice that the scrollbars are disabled when they should be enabled.

Keywords: kbbug kbvfp500fix KB147572

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.