E
eddiec
Hi,
I have a grid view that is bound to a linq data source.
The data for the linq data source is bound to a linq array in the
Selecting event for the linq data source.
var MyObjectArray =
from o in context.MyObjects
where (o.ID.Equals(intID))
select o;
I can display simple attributes of the linq array in the data grid.
The problem is that the object type that is returned in the linq query
has as an attribute a second object type.
How can I display attributes of the second object type in the grid
view?
e.g. MyObject1.MyObject2.Name
I have tried Object2.Name in the grid:
<asp:BoundField DataField="Object2.Name" HeaderText="Name" />
but this results in an error:
"A field or property with the name 'Object2.Name' was not found on the
selected data source."
Any assistance would be much appreciated.
cheers,
eddiec![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)
I have a grid view that is bound to a linq data source.
The data for the linq data source is bound to a linq array in the
Selecting event for the linq data source.
var MyObjectArray =
from o in context.MyObjects
where (o.ID.Equals(intID))
select o;
I can display simple attributes of the linq array in the data grid.
The problem is that the object type that is returned in the linq query
has as an attribute a second object type.
How can I display attributes of the second object type in the grid
view?
e.g. MyObject1.MyObject2.Name
I have tried Object2.Name in the grid:
<asp:BoundField DataField="Object2.Name" HeaderText="Name" />
but this results in an error:
"A field or property with the name 'Object2.Name' was not found on the
selected data source."
Any assistance would be much appreciated.
cheers,
eddiec
![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)