Hi,
I have a Ria service that its domain context contains many tables.
When i bind the coverflow control, I can see the top level table data but the related table infromation wouldn't show. Please note that I used the same scenario with tileview and coverflow controls together which works perfectly.
But in this instance, it shows only one table's data.
Can you help me please? I appreciate your help in advance.
Kam
Please see the service code:
And its metadata is:
the xaml code is:
And the code behind:
I have a Ria service that its domain context contains many tables.
When i bind the coverflow control, I can see the top level table data but the related table infromation wouldn't show. Please note that I used the same scenario with tileview and coverflow controls together which works perfectly.
But in this instance, it shows only one table's data.
Can you help me please? I appreciate your help in advance.
Kam
Please see the service code:
[EnableClientAccess()]
public class GroupServices : LinqToEntitiesDomainService<
wave3groupsEntity
>
{
public IQueryable<
CategoryGroup
> GetCategoryGroups()
{
return this.ObjectContext.CategoryGroups;
}
public IQueryable<
CategoryGroup
> GetCategoryGroupsWithhomepage()
{
return this.ObjectContext.CategoryGroups.Include("homepages");
}
public IQueryable<
CategorySubGroup
> GetCategorySubGroups()
{
return this.ObjectContext.CategorySubGroups;
}
public IQueryable<
EventsFeeder
> GetEventsFeeders()
{
return this.ObjectContext.EventsFeeders;
}
public IQueryable<
homepage
> GetHomepages()
{
return this.ObjectContext.homepages;
}
public IQueryable<
logo
> GetLogos()
{
return this.ObjectContext.logos;
}
public IQueryable<
NewsFeeder
> GetNewsFeeders()
{
return this.ObjectContext.NewsFeeders;
}
public IQueryable<
Newstag
> GetNewstags()
{
return this.ObjectContext.Newstags;
}
public IQueryable<
TagManager
> GetTagManagers()
{
return this.ObjectContext.TagManagers;
}
}
And its metadata is:
[MetadataTypeAttribute(typeof(CategoryGroup.CategoryGroupMetadata))]
public partial class CategoryGroup
{
internal sealed class CategoryGroupMetadata
{
private CategoryGroupMetadata()
{
}
public string Category { get; set; }
[Include]
public EntityCollection<
CategorySubGroup
> CategorySubGroups { get; set; }
public int catid { get; set; }
public string Description { get; set; }
[Include]
public EntityCollection<
homepage
> homepages { get; set; }
public int lid { get; set; }
public Nullable<
bool
> visiable { get; set; }
}
}
the xaml code is:
<
telerik:RadCoverFlow
x:Name
=
"lstcategory"
Grid.Column
=
"1"
Grid.Row
=
"2"
Grid.RowSpan
=
"5"
Grid.ColumnSpan
=
"6"
CameraViewpoint
=
"Top"
>
<
telerik:RadCoverFlow.ItemTemplate
>
<
DataTemplate
>
<
Border
Height
=
"250"
Width
=
"500"
BorderBrush
=
"White"
BorderThickness
=
"3"
>
<
Grid
x:Name
=
"grdinnercoverflowgroup"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"30"
></
RowDefinition
>
<
RowDefinition
Height
=
"100*"
></
RowDefinition
>
<
RowDefinition
Height
=
"30"
></
RowDefinition
>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"10"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"100*"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"10"
></
ColumnDefinition
>
</
Grid.ColumnDefinitions
>
<
Canvas
Grid.Column
=
"0"
Grid.Row
=
"0"
Grid.ColumnSpan
=
"3"
Grid.RowSpan
=
"3"
>
<
Canvas.Background
>
<
ImageBrush
Stretch
=
"Fill"
ImageSource
=
"/GreenGroup;component/Images/glossybackground2.png"
></
ImageBrush
>
</
Canvas.Background
>
</
Canvas
>
<
TextBlock
Text
=
"{Binding Category}"
HorizontalAlignment
=
"Center"
FontSize
=
"16"
FontWeight
=
"Bold"
Foreground
=
"White"
Grid.Column
=
"1"
Grid.Row
=
"0"
></
TextBlock
>
<
StackPanel
DataContext
=
"{Binding homepages}"
Grid.Column
=
"1"
Grid.Row
=
"1"
>
<
TextBlock
Text
=
"{Binding whoweare}"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
></
TextBlock
>
</
StackPanel
>
</
Grid
>
</
Border
>
</
DataTemplate
>
</
telerik:RadCoverFlow.ItemTemplate
>
</
telerik:RadCoverFlow
>
public partial class MainPage : RadPage
{
GroupServices mygroups = new GroupServices();
public MainPage()
{
InitializeComponent();
displaybackground();
}
private void displaybackground()
{
lstcategory.ItemsSource = mygroups.CategoryGroups;
mygroups.Load(mygroups.GetCategoryGroupsWithhomepageQuery());
mygroups.Load(mygroups.GetHomepagesQuery());
}
}