I have a remote web-method that returns an array of strongly-typed objects;
on the client this gets a schema-based representation (as per wsdl.exe).
I have an array of (for instance) SearchResult objects; this has some simple
properties (which work fine), and some that are more complex - i.e. a
Customer property that is of type Person, which itself has properties Name
and Ref.
I want to bind a DataGridView to a List<SearchResult>; this works fine,
except that I can't get at the sub-properties - i.e. Customer.Name. If
DataGridView used Binding objects, I could probably just use
"Customer.Name", but this doesn't seem to work in the
DataGridViewColumn.DataPropertyName; I've also tried setting the
DefaultCellStyle.Formatter to a custom formatter, but it never hits the
GetFormat or Format methods.
Obviously, with an auto-generated (wsdl.exe) class, overriding ToString()
isn't realistic - so: how can I get my sub-properties to appear in a
DataGridView?
All suggestions welcomed...
Marc