DataBinding RadGridView in TileView

3 posts, 0 answers
  1. Rick
    Rick avatar
    7 posts
    Member since:
    Aug 2011

    Posted 01 Jun 2012 Link to this post

    I have a RadTileView using the RadFluidContentControl. Everything is working well and I can bind to my ProductTile collection in my ViewModel and have no problems displaying properties from the ProductItem object that is a member of my ProductTile class. The XAML below works fine

    <Border BorderBrush="DarkGray" BorderThickness="1" CornerRadius="3" Grid.Row="6" Grid.Column="1" Height="20">
             <ImageBrush ImageSource="/SilverlightApplication1;component/Images/FrostedGlass0002.png" Opacity=".7"></ImageBrush>
         <TextBlock  HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Path=productItem.productPrice}"></TextBlock>

    I am having a problem displaying any of the ProductItem properties inside a RadgridView. The XAML below does not display anything nor does the CellTemplateSelector get called

    <Border BorderBrush="DarkGray" BorderThickness="1" CornerRadius="3" Grid.Row="7" Grid.Column="1" Height="20">
            <ImageBrush ImageSource="/SilverlightApplication1;component/Images/FrostedGlass0002.png" Opacity=".7"></ImageBrush>
        <telerik:RadGridView AutoGenerateColumns="False"
                             ShowColumnHeaders="False" ShowColumnFooters="False"
                             ShowGroupPanel="False"  >
                <telerik:GridViewDataColumn DataMemberBinding="{Binding productItem.productRebate}" Header="Rebate"  CellTemplateSelector="{StaticResource productOfferTemplateSelector}"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding productItem.productSpecialOffer}"  CellTemplateSelector="{StaticResource productOfferTemplateSelector}"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding productDiscount}" CellTemplateSelector="{StaticResource productOfferTemplateSelector}"></telerik:GridViewDataColumn>

    what have I missed?

    Thanks in Advance

  2. Rick
    Rick avatar
    7 posts
    Member since:
    Aug 2011

    Posted 04 Jun 2012 Link to this post

    I have resolved the issue with DataBinding the ItemsSource in the RadGridView. I added an ObservableCollection<ProductItem> to my ViewModel that the RadTileItem was bound to. Now I can set the ItemSource to this and all my bindings work.


  3. Zarko
    Zarko avatar
    755 posts

    Posted 05 Jun 2012 Link to this post

    Hello Rick,
    We're glad that you we able to resolve your problem and if you have further questions please feel fee to ask.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top