FIX: DataGrid Column 1 Visible = False Does Not Work With ADC
ID: Q223070
|
The information in this article applies to:
-
Microsoft Visual Basic Professional and Enterprise Editions for Windows, version 6.0
SYMPTOMS
With the version of the DataGrid that initially shipped with Visual Basic 6.0 (MSDatGrd.OCX version 6.00.8169), a column whose visible property is set to False may appear in the grid if the user clicks on the horizontal scrollbar's thumb.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio 6.0 Service Packs, please see the following articles in the Microsoft Knowledge Base:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
MORE INFORMATION
If you're using the original shipping version of the DataGrid (version 6.00.8169), this behavior occurs when the DataGrid is bound to a recordset in any number of ways, such as binding to an ADO Data Control, a DataEnvironment command, or directly to an ADO recordset in code.
Steps to Reproduce Behavior
- Create a new Visual Basic project. Form1 is created by default.
- Add a DataEnvironment to the project.
- Set the DataEnvironment's connection to connect to your database. For example, you could use the Access database NWind.MDB with the Jet 3.51 OLE DB provider.
- Create a command on the connection to query a table in your database and add a select statement in the SQL window.
- Right-drag the command onto your form and select DataGrid to create a DataGrid bound to that DataEnvironment's command.
- Right-click on the DataGrid and select "Retrieve Fields." In order to cause this problem, you must create your query and grid in such a way that the DataGrid displays a horizontal scrollbar. You may need to decrease the width of your DataGrid or use a query that returns more fields.
- Right-click on the DataGrid and select "Properties..."
- On the Layout tab of the properties page, deselect the Visible checkbox to hide the first column in the grid.
- Run the project, and note that the first column in the grid will be hidden..
- Click on the thumb for the horizontal scrollbar while the thumb is as far to the left as possible.
If you are using the DataGrid that initially shipped with Visual Basic 6.0 (version 6.00.8169), you will now see that first column in the grid.
Additional query words:
Keywords : kbservicepack kbCtrl kbVBp600bug kbVS600sp3fix kbGrpVBDB
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug