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

GridviewImageColumn : Targetinvocation exception

1 Answer 54 Views
GridView
This is a migrated thread and some comments may be shown as answers.
naresh
Top achievements
Rank 1
naresh asked on 15 Jan 2014, 08:43 AM
Hi Telerik,

In my application I am using telerik:GridViewImageColumn.
My scenario is I am assigning collection to gridview each object row contains the byte array of image. Collection contains more than 1000 rows.  Actually collection is for my company product users. We have few products (say 10).
I am showing those product user details in gridview with product image. Each user row contains product image byte array.
After assigning data source when I scroll the gridview sometimes getting exception “Target invocation exception”

Exception type: TargetInvocationException

Source: mscorlib

-----
-----
------

======== InnerException ========

        Description: The value should not null.

Parametername: uriSource

        Exception type: ArgumentNullException

        Source: PresentationCore

        Stack Trace:

 System.Windows.Media.Imaging.BitmapImage..ctor(Uri uriSource, RequestCachePolicy uriCachePolicy)

    Telerik.Windows.Controls.GridViewImageColumn.image_ImageFailed(Object sender, 
ExceptionRoutedEventArgs e)


My xaml code for assigning data member is

<telerik:GridViewImageColumn Header=""  UniqueName="colProductImage" DataMemberBinding="{Binding ProductImage}" ImageHeight="20" ImageWidth="20" /> 

What could be the solution for above problem?

My idea is to avoid above problem, instead of loading image byte data for each row just loads all 10 products data in one collection and give the reference to image column with collection index. If it is possible  please tell how to do .

Thanks for help. Naresh Mesineni

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 15 Jan 2014, 11:59 AM
Hi,

Unfortunately we can not reproduce such an issue at our side. Please check if you have configured the column right.

If you are still getting the exception, then please send us a simple demo project which we could debug locally.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
naresh
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or