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

GridAttachmentColumn Linq.Binary

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Benny
Top achievements
Rank 1
Benny asked on 12 Aug 2010, 03:02 PM
Anyone manage to download a document using GridAttachmentColumn when the document is stored in System.Data.Linq.Binary format?

I get a javascript error.....
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Det gick inte att omvandla ett objekt av typen System.Data.Linq.Binary till typen System.Byte[].

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 17 Aug 2010, 04:14 PM
Hi Benny,

You need to either modify your LINQ entity model to change the type of  the data field from System.Linq.Data.Binary to byte[], or use a GridTemplateColumn with a RadBinaryImage in the ItemTemplate. The binary image in the latter scenario can then be databound using the following binding expression:

<telerik:RadBinaryImage DataValue='<%# Eval("Data") != null && Eval("Data") != DBNull.Value ? ((System.Linq.Data.Binary)Eval("BinaryImageDataField")).ToArray() : null%>' />

Regards,
Veli
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
Tags
Grid
Asked by
Benny
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or