G
Guest
I am binding a DataGridView with a List of custom objects which itself has
both intrinsic and custom properties. I accomplish the binding through a
BindingSource instantiated with a BindingList instantiated with the list of
custom objects. The grid correctly sets up all of the columns, but does not
allow me to enter a new value for columns that represent custom properties of
the unterlying object. Intrinsic and string values do not have the same
problem.
The problem occurs after after entering a valid value it the problematic
column, attempting to move off the cell throws a FormatException with a
message that starts with "Invalid cast from 'System.String' to ..."
The offending object type is defined as a struct and implements a
IConvertible and several implicit operators including to and from string
casting.
Any help in the matter would be greatly appreciated.
Nejat
both intrinsic and custom properties. I accomplish the binding through a
BindingSource instantiated with a BindingList instantiated with the list of
custom objects. The grid correctly sets up all of the columns, but does not
allow me to enter a new value for columns that represent custom properties of
the unterlying object. Intrinsic and string values do not have the same
problem.
The problem occurs after after entering a valid value it the problematic
column, attempting to move off the cell throws a FormatException with a
message that starts with "Invalid cast from 'System.String' to ..."
The offending object type is defined as a struct and implements a
IConvertible and several implicit operators including to and from string
casting.
Any help in the matter would be greatly appreciated.
Nejat