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

Pavel's image displaying

0 Answers 11 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 08 Mar 2011, 06:17 PM
Hi there.

I've been reading Pavel's blog entry on displaying images from binary data at blogs.telerik.com/pavelpavlov (post from 12th Jan 2010). I'd post this comment there, but I get repeated server errors, so that's not happening... so I'm posting it here! (I am aware there is a sample project there, but it fails to open for me, something to do with conversion between Silverlight versions)

Anyway, this is blog we have a RadGridView with an image column which is bound to a database. I'm not entirely sure what type the data is in the database, but I'm to assume something like SQL's varbinary(MAX). In the example, it's as simple as this:

<telerik:GridViewImageColumn DataMemberBinding="{Binding Image.Bytes}" ImageWidth="100" />

I would love to have something like this because it seems very easy, but it doesn't work for me. I should say that I am fairly sure the data in the database is correct because I have used another method with a converter to show the image. I'd rather not go with that method though because I need to find the width and height of the image... well, suffice it to say I'd love it if this method worked.

If there are any hints... and even Pavel if you're out there... anything would be useful. Also, UserImage (which is 'Image' in my database) does not have a property 'Bytes'.

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Steve
Top achievements
Rank 1
Share this question
or