Microsoft KB Archive/223083

= FIX: Changes to MSHFlexgrid Adding/Removing Records Not Visible =

Article ID: 223083

Article Last Modified on 1/11/2001

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q223083



SYMPTOMS
After using the Remove method of the MSHFlexGrid, rows added with the AddItem method may not be visible.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are 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 service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



Steps to Reproduce Behavior
 Create a new standard Visual Basic project. Form1 is create by default. Add the MSHFlexGrid to the Visual Basic toolbox. Place an MSHFlexGrid and two CommandButtons on the form.  Add the following code to your application: Private Sub Command1_Click MSHFlexGrid1.AddItem "Hello" End Sub

Private Sub Command2_Click MSHFlexGrid1.RemoveItem MSHFlexGrid1.Rows - 1 End Sub

Private Sub Form_Load Command1.Caption = "AddItem" Command2.Caption = "RemoveItem" End Sub

 Run the project Click the "Command1" button three times to add three rows.</li> Click the "Command2" button three times to remove the three rows.</li> Click the "Command1" button three times again to add back the three rows.</li></ol>

If you're using the MSHFlexGrid prior to the version that shipped with Visual Basic 6.0 Service Pack 3, you won't see the second batch of rows created by clicking the AddItem button.

With the version of MSHFlexGrid that shipped with Visual Basic 6.0 Service Pack 3, this problem does not occur.

Keywords: kbbug kbfix kbctrl kbvs600sp3fix KB223083

-

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

© Microsoft Corporation. All rights reserved.