Hi,
> Hi,
>
> I have an object within a collection. This object has an attribute that
> I need to bind to a datagridview column.
This is a bit confusing, i guess you're talking about fields not attributes
(attributes have a different meaning in dotnet) and the link to the thread
you posted is about binding properties of subobjects, from the above i
assume that's not what you want.
> I saw this thread
>
[quoted text clipped - 3 lines]
> with mine is that I'm retriving it from a webservices. I dont' have the
> luxury of modifying it.
DataBinding only works with properties not fields, in the thread there is a
mention of FieldsToPropertiesTypeDescriptionProvider which you could use and
download from http://msdn.microsoft.com/msdnmag/issues/05/05/NETMatters/.
It doesn't require you to change the type, you can register a provider at
startup, ie: (see article too)
TypeDescriptor.AddProvider(new
FieldsToPropertiesTypeDescriptionProvider
(typeof(YourType)), typeof(YourType));
Another option is to use an object wrapper that exposes the fields as real
properties:
http://www.microsoft.com/belux/msdn/nl/community/columns/jtielens/webservicewrap
per.mspx
Or another wsdl tool that can generate properties:
http://weblogs.asp.net/cweyer/archive/2003/11/21/39070.aspx
HTH,
Greetings
> I guess the next best thing for me is to write a converter for this
> webservices and convert it using the .ToString() method described.
[quoted text clipped - 4 lines]
>
> Any suggestion is greatly appreicate it.