Well Mike, I think I spoke too soon. After playing with it for quite some time I still can't get it to display the Description field from the lookup table. Thought I'd repost here to see if you have a minute to take a look at what might be wrong. I copied the code from the other thread for ease, but it's still not displaying. The deep load is working fine in the code behind, so I know my relationships are setup correctly and everything should be working. This is the code that WORKS (in C#)
ProductionService service = new ProductionService();
Production production = service.GetByProductionID(1);
Type[] typesToDeepLoad = new Type[] { typeof(PropstarStatus)};
service.DeepLoad(production, false, DeepLoadType.IncludeChildren, typesToDeepLoad);
With that code, I can call
production.PropstarStatusIDSource.Description
and get the description just fine. However, on the ASP.NET side, it comes back null, or empty string. This is the code, similar to the other post, that I can't seem to make work:
<data:EntityGridView ID="egvSearch" runat="server" AutoGenerateColumns="False"
DataSourceID="dsProduction"
DataKeyNames="ProductionID"
AllowMultiColumnSorting="False"
DefaultSortDirection="Ascending"
ExcelExportFileName="Export_Orders.xls"
AllowSorting="True"
AllowPaging="True" AllowExportToExcel="True" ExportToExcelText="Excel" PageSelectorPageSizeInterval="10">
<Columns>
<asp:BoundField DataField="Title" HeaderText="Title" />
<asp:TemplateField HeaderText="Status">
<ItemTemplate>
<%# Eval("PropstarStatusIDSource.Description")%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</data:EntityGridView>
<data:ProductionDataSource ID="dsProduction" runat="server" SelectMethod="GetPaged">
<DeepLoadProperties Method="IncludeChildren" Recursive="false">
<Types>
<data:ProductionProperty Name="PropstarStatus" />
</Types>
</DeepLoadProperties>
<Parameters>
<asp:ControlParameter Name="WhereClause" ControlID="__Page" PropertyName="WhereClause" Type="String" />
<asp:ControlParameter Name="OrderByClause" ControlID="egvSearch" PropertyName="SortExpression" Type="String" />
<asp:ControlParameter Name="PageIndex" ControlID="egvSearch" PropertyName="PageIndex" Type="Int32" />
<asp:ControlParameter Name="PageSize" ControlID="egvSearch" PropertyName="PageSize" Type="Int32" />
<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
</Parameters>
</data:ProductionDataSource>
Any ideas?
Scott Klarenbach
PointyHat Software
www.pointyhat.ca
_______________________________________
To iterate is human; to recurse, divine