This question is locked. New answers and comments are not allowed.
Using the Northwind database as an example, how would Products.ProductName be displayed as a child element for Supplier.CompanyName in the RadPanelBar?
The datasource is from an Entity Framework Model which just contains the Supplier and Product tables. A domain service has been created to utilize this .edmx file. Basically, how can the main header and sub items be populated using the Entity Framework? The sample code below is more or less a spin from this help documentation.
The datasource is from an Entity Framework Model which just contains the Supplier and Product tables. A domain service has been created to utilize this .edmx file. Basically, how can the main header and sub items be populated using the Entity Framework? The sample code below is more or less a spin from this help documentation.
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my1:Supplier, CreateList=true}" Height="0" LoadedData="supplierDomainDataSource_LoadedData" Name="supplierDomainDataSource" QueryName="GetSuppliersQuery" Width="0"> |
<riaControls:DomainDataSource.DomainContext> |
<my:NorthwindDomainContext /> |
</riaControls:DomainDataSource.DomainContext> |
</riaControls:DomainDataSource> |
<telerik:RadPanelBar Height="500" ItemsSource="{Binding ElementName=supplierDomainDataSource, Path=Data}" Name="supplierRadPanelBar" Width="200" > |
<telerik:RadPanelBar.ItemTemplate> |
<telerik:HierarchicalDataTemplate ItemsSource="{Binding CompanyName}"> |
<StackPanel> |
<TextBlock Text="{Binding Products.ProductName}" /> |
</StackPanel> |
</telerik:HierarchicalDataTemplate> |
</telerik:RadPanelBar.ItemTemplate> |
</telerik:RadPanelBar> |