BUG: Container Property of DBGrid Does Not Behave Correctly (149267)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q149267 SYMPTOMS
If the container property of the DBGrid control is changed at run time,
subsequent changes to the DBGrid's properties will still reflect the
initial container. If the Name property of the Container object (that is,
DBGrid1.Container.Name) is examined, it will return the newly set
container, but the DBGrid itself will not honor this change.
WORKAROUND
To work around this problem, place the DBGrid control inside another
container (such as a PictureBox or Frame), size this container, and set
properties so that the DBGrid appears as normal, and then set the
properties of this container instead of the properties of the DBGrid.
Steps 5 - 9 of the reproduction sample below demonstrate this workaround.
STATUS
Microsoft has confirmed this to be an issue in the Microsoft products
listed at the beginning of this article. Microsoft is researching this
problem and will post new information here in the Microsoft Knowledge Base
as it becomes available.
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kbbug KB149267 |
---|
|