Thanks for your help Eliyahu.
Maybe it would be possible to "flatten out" an object like that but it would
not be very useable. Just imagine 10 addresses x 5 fields = 50 more
properties? And if a new address is needed the class definition needs an
update!?
Is there another solution possible? Otherwise the ObjectDataSource could
only be used with "flat" custom classes? Maybe switch from arrays to
generics?
--
Thanks again,
Kees de Winter
"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@mMvVpPsS.orgwrote in
message news:%232dahxAVHHA.4380@TK2MSFTNGP03.phx.gbl...
Quote:
Addresses(0).Street is not a name of a field, it is an expression. Can
your
Quote:
object expose it as a separate property? Then you could bind to it.
>
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin http://usableasp.net
>
>
"Kees de Winter" <nospam@nospam.orgwrote in message
news:45d97117$0$11825$ba620dc5@text.nova.planet.nl ...
Quote:
Hello,
I am binding an ObjectDataSource control to a custom object. A
Detailsview
Quote:
Quote:
shows the data from the object. "Normal" properties are shown allright,
but
I cannot get array properties to be shown. For example:
This works fine:
(In DetailsView)
<asp:BoundField DataField="drivingDirections"
HeaderText="drivingDirections"
SortExpression="drivingDirections" />
But this doesn't:
Suppose there was an array property "Addresses" holding address objects
(just an example):
<asp:BoundField DataField="Addresses(0).Street" HeaderText=""
SortExpression="" />
I hope it is just a syntactical issue? Which syntax to use?
--
Thanks for any help,
Kees de Winter
>
>