This is a migrated thread and some comments may be shown as answers.

Ria Services (Rational database) with coverflow

5 Answers 68 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
Kamal Mostofi
Top achievements
Rank 1
Kamal Mostofi asked on 11 Nov 2010, 11:49 PM
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:
[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>
 And the code behind:

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());
       }
   }

5 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 17 Nov 2010, 10:11 AM
Hello Kamal,

Thank you for contacting us.

As long as I understand, you set CategoryGroups as ItemsSource of the RadCoverFlow. Each CategoryGroup has Category and homepages (is homepages a collection or a not?). Finally, homepages has whoweare property. Please, correct my if I am wrong. Could you please specify which data is not loaded? Also, could you please share with us the scenario with tileview and coverflow together that works.
I will be glad to assist you further.

Greetings,
George
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
Kamal Mostofi
Top achievements
Rank 1
answered on 17 Nov 2010, 11:14 AM
Hi,
That's correct. My Categorygroups is a collection of records (datatable) and Homepages is another collection (datatable) that links to Categorygroups. In the metadata I used [Include] and in my codebehind I try to call the query class. but it shows either the categorygroups data if I bind the data or it shows Homepages data.
I used Tileview and coverflow in another project where I load two queries from codebehind and works perfectly. It similar to the sample you have on your website.

If you need any more information, please let me know.
thanks,
Kamal 
0
George
Telerik team
answered on 22 Nov 2010, 02:11 PM
Hello Kamal,

Your code looks fine. I cannot find the problem. Can you send us a sample running project?. It will definitely help us in further pinpointing and resolving the problem. 
I will be glad to assist you further.

Greetings,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Kamal Mostofi
Top achievements
Rank 1
answered on 19 Dec 2010, 10:53 PM
Hi George,
I am sorry to reply with delays. I am still cant get the rational data to show in Coverflow items.

Do you have an example where data retrieve from RIA services where two tables are linked? and can display it in Coverflow items.

I do appreciate your help here.
Many thanks,
Kam
0
George
Telerik team
answered on 23 Dec 2010, 02:34 PM
Hi Kamal,

Attached you can find the sample. I hope this helps. 

Greetings,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
CoverFlow
Asked by
Kamal Mostofi
Top achievements
Rank 1
Answers by
George
Telerik team
Kamal Mostofi
Top achievements
Rank 1
Share this question
or