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">
         <Border.Background>
             <ImageBrush ImageSource="/SilverlightApplication1;component/Images/FrostedGlass0002.png" Opacity=".7"></ImageBrush>
         </Border.Background>
         <TextBlock  HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Path=productItem.productPrice}"></TextBlock>
     </Border>

    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">
        <Border.Background>
            <ImageBrush ImageSource="/SilverlightApplication1;component/Images/FrostedGlass0002.png" Opacity=".7"></ImageBrush>
        </Border.Background>
        <telerik:RadGridView AutoGenerateColumns="False"
                             Background="Transparent"
                             IsReadOnly="True"
                             ShowColumnHeaders="False" ShowColumnFooters="False"
                             ShowGroupPanel="False"  >
            <telerik:RadGridView.Columns>
                <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>
            </telerik:RadGridView.Columns>
         </telerik:RadGridView>
    </Border>

    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.

    Thanks

    Rick
  3. DevCraft banner
  4. Zarko
    Admin
    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.

    Greetings,
    Zarko
    the Telerik team

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

Back to Top