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

[Solved] GridViewImageColumn DataMemberBinding

1 Answer 295 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kevin
Top achievements
Rank 1
Kevin asked on 01 Mar 2011, 01:01 AM
Hello,

what type of object is the DataMemberBinding property of the GridViewImageColumn looking for?

I have tried different variations with no luck...

For example, here is the xaml:
<telerik:GridViewImageColumn DataMemberBinding="{Binding URL}"
                                         ImageHeight="400"
                                         ImageWidth="400"
                                         ImageStretch="Uniform"
                                         Header=""/>

     
The URL property of the DataContext is a string url to the image.    This is not working.  It is also not working when I write a custom converter that converts the URL to an ImageSource, and sets the DataMemberBinding property.  Such as:

<telerik:GridViewImageColumn DataMemberBinding="{Binding URL, Converter={StaticResource URLToImageConverter}}"
                                         ImageHeight="400"
                                         ImageWidth="400"
                                         ImageStretch="Uniform"
                                         Header=""/>

What am I doing wrong?



1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 03 Mar 2011, 08:44 AM
Hello Kevin,

It takes the Uri type. Please, refer to the attached sample project, for an example of a bound GridViewImageColumn.

Best wishes,
Ivan Ivanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Kevin
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or