Image from Object in RowDetailsTemplate

3 posts, 1 answers
  1. Perry
    Perry avatar
    6 posts
    Member since:
    Jun 2009

    Posted 09 Jul 2010 Link to this post

    I have a working GridView that is populated using MVVM Light.
    I have an IEnumerable object SerieIssues that has SerieIssue objects. One of the fields is a byte[] with an image from the WCF .NET RIA DomainService. This image is working and shown as a GridViewImageColumn.
    Now I want to show the image as a RowDetail in a much larger size when the row is selected. I tried everything but the image just won't show. What am I doing wrong?









    <telerik:RadGridView Grid.Column="1" Grid.Row="1"   ItemsSource="{Binding Path=SerieIssues, Mode=TwoWay}" AutoGenerateColumns="False" RowDetailsVisibilityMode="VisibleWhenSelected">
                        <telerik:GridViewImageColumn DataMemberBinding="{Binding frontCover}"  UniqueName="FrontCover" ImageHeight="80"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding serieName}" Header="Serie" UniqueName="SerieName" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding subSerieName}" Header="Sub Serie" UniqueName="SubSerieName" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding issueNumber}" Header="Issue" UniqueName="Issue" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding storyName}" Header="Story" UniqueName="StoryName" />
                              <Image Margin="2.278,3.6,0,0" Source="{Binding Path=frontCover}" Stretch="Fill" HorizontalAlignment="Left" VerticalAlignment="Top" Height="70.082" Width="70.082"  />       






    Thank you in advance,
    Perry van der Meeren
  2. Answer
    Yavor Georgiev
    Yavor Georgiev avatar
    982 posts

    Posted 09 Jul 2010 Link to this post

    Hi Perry,

     You should use the Telerik.Windows.Controls.BinaryImageConverter class as the BindingConverter. It's what the GridViewImageColumn uses internally.

    Sincerely yours,
    Yavor Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Perry
    Perry avatar
    6 posts
    Member since:
    Jun 2009

    Posted 09 Jul 2010 Link to this post

    Thank you Yavor for the quick response.
    As I expected: so easy! ;)

Back to Top