
Designer tries to write to read-only VisibleColumnCount property of DataGrid
I am inheriting a datagrid from a base form class. The Modifiers
property of the DataGrid is set as protected and when I try to
Build...I get the following build error:
Property 'VisibleColumnCount' is 'ReadOnly'
and here is the line with the error:
Me.dgResults.VisibleColumnCount = 9
The funny thing is...I erase or comment out this line and the code
builds and executes just fine. However, if I do any modifications to
the datagrid or the form it is on, the designer adds the same line and
I get the build error again.
I saw a similar post in the microsoft.public.dotnet.languages.CSharp
group but with a very poor answer (have you accidentally deleted the
datagrid, or something like that). In any event, any help would be
appreciated.