Microsoft KB Archive/308899

= FIX: Cannot Reset ReadOnly Property of DataGrid to False =

Article ID: 308899

Article Last Modified on 3/20/2003

-

APPLIES TO


 * Microsoft .NET Framework 1.1

-



This article was previously published under Q308899



SYMPTOMS
At design time or at run time, if you change the ReadOnly property of the DataGrid control from True to False, you may receive the following error message:

Invalid Property Value

When you click Details, you receive the following error message:

Object reference not set to an instance of an object.



RESOLUTION
To resolve this problem, set the DataSource property of the DataGrid control before you set the ReadOnly property.



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 Microsoft .NET Framework 1.1.



Steps to Reproduce Behavior

 * 1) Open Visual Studio .NET.
 * 2) Create a new Windows Application project in Microsoft Visual Basic .NET. Form1 is added to the project by default.
 * 3) Add a DataGrid control to Form1.
 * 4) Set the ReadOnly property for the DataGrid to True.
 * 5) Change the ReadOnly property for the DataGrid to False. You receive the above-mentioned error message.

Additional query words: cannot change return to false

Keywords: kbbug kbfix kbpending KB308899

-

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

© Microsoft Corporation. All rights reserved.