O
Oli
I have written a simple UserControl that consists of a datagridview
and two buttons that control the scrolling of the grid.
All is fine and dandy - .....nearly
The datagridview that's on the UserControl is actually exposed as a
property: "Grid" - this is a quick and dirty (suitable here) way of
allowing access to the Grid properties.
in the designer the "Grid" property shows up ok - however accessing
the "Columns" property within that gives "object reference not set to
an instance of an object".
If I expose the "Columns" property of the underlying grid via a
"Columns" property the UserControl - then this as expected also shows
up in the designer - but still fails (with a different error message
in this case).
Anyone know if there are any issues I should know about when writing a
UserControl that contain a DataGridView??
thanks,
O.
and two buttons that control the scrolling of the grid.
All is fine and dandy - .....nearly
The datagridview that's on the UserControl is actually exposed as a
property: "Grid" - this is a quick and dirty (suitable here) way of
allowing access to the Grid properties.
in the designer the "Grid" property shows up ok - however accessing
the "Columns" property within that gives "object reference not set to
an instance of an object".
If I expose the "Columns" property of the underlying grid via a
"Columns" property the UserControl - then this as expected also shows
up in the designer - but still fails (with a different error message
in this case).
Anyone know if there are any issues I should know about when writing a
UserControl that contain a DataGridView??
thanks,
O.