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

How do I create a dynamically bound GridView with a static GridViewImageColumn

1 Answer 64 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.
Andrew
Top achievements
Rank 1
Andrew asked on 15 Jun 2012, 05:29 PM
Hi,

I'm using the method at this link (http://blogs.telerik.com/vladimirenchev/posts/11-09-28/dynamic-binding-for-your-silverlight-applications.aspx) to dynamically bind a GridView. But I'd also like to be able to have an image column that always appears as the first column. The image would change based on the underlying object in the data dictionary. I've tried using both an Image and Uri object but they both just seem to bind as the ToString() method's return value of each object.

Is there a way to use the dynamic binding to display content other than text? If so could you show me how to modify the sample project in the link I provided to achieve such a goal?

Thanks,
Andrew

1 Answer, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 18 Jun 2012, 11:39 AM
I solved this by binding a static GridViewImageColumn to a hidden column in the dynamic data table whose value was the Uri of the image I wished to display.
Tags
GridView
Asked by
Andrew
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Share this question
or