Microsoft KB Archive/191723

= BUG: DataGrid Column Appears To Be Missing =

Article ID: 191723

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q191723



SYMPTOMS
If the Visible property of the left-most column in a DataGrid is set to False, the column will not become visible after its visible property is reset to True. This problem does not occur with other columns in the grid. If the grid has a horizontal scroll bar, the left-most column can be scrolled to. If the grid does not have a horizontal scroll bar, the left most column cannot be seen.



RESOLUTION
Set the LeftCol Property of the DataGrid to 0, after you set the Visible Property to True.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior
 Create an Jet 3.5 (Access97) database that contains a table with two fields in it. Create a Standard EXE Project in Visual Basic. Form1 is created by default. From Project/Components, select the "Microsoft ADO Data Control 6.0 (OLEDB)" and "Microsoft DataGrid Control 6.0 (OLEDB)." Place an ADO Data Control and DataGrid on the Form.  Insert the following code: Private Sub Form_Load Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51; _       Data Source=c:\mydb.mdb" Adodc1.RecordSource = "Select * from mytable" Set DataGrid1.DataSource = Adodc1

DataGrid1.Columns(0).Visible = False DataGrid1.Columns(0).Visible = True 'DataGrid1.LeftCol = 0 ' uncomment this line as workaround

End Sub

 Press the F5 key to run code and note that only the second column appears.</li></ol>

Additional query words: kbCtrl kbVBp600bug kbdse kbDSupport kbVBp kbDataBinding

Keywords: kbbug kbpending KB191723

-

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

© Microsoft Corporation. All rights reserved.