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

Image from Object in RowDetailsTemplate

2 Answers 66 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Perry
Top achievements
Rank 2
Perry asked on 09 Jul 2010, 08:45 AM
Hi,
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:RadGridView.Columns>
                    <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" />
                </telerik:RadGridView.Columns>
                <telerik:RadGridView.RowDetailsTemplate>
                    <DataTemplate>
                        <StackPanel
                          <Image Margin="2.278,3.6,0,0" Source="{Binding Path=frontCover}" Stretch="Fill" HorizontalAlignment="Left" VerticalAlignment="Top" Height="70.082" Width="70.082"  />       
                        </StackPanel>
                    </DataTemplate>
                </telerik:RadGridView.RowDetailsTemplate>
            </telerik:RadGridView>

 

 

 

 

 


Thank you in advance,
Perry van der Meeren
 

2 Answers, 1 is accepted

Sort by
0
Accepted
Yavor Georgiev
Telerik team
answered on 09 Jul 2010, 09:29 AM
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
0
Perry
Top achievements
Rank 2
answered on 09 Jul 2010, 11:35 AM
Thank you Yavor for the quick response.
As I expected: so easy! ;)

Regards,
Perry
Tags
GridView
Asked by
Perry
Top achievements
Rank 2
Answers by
Yavor Georgiev
Telerik team
Perry
Top achievements
Rank 2
Share this question
or