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

Asynchronously adding images via URL to grid rows

4 Answers 189 Views
GridView
This is a migrated thread and some comments may be shown as answers.
jwhitley
Top achievements
Rank 1
jwhitley asked on 16 Jun 2010, 05:02 PM
I have a grid view containing several hundred rows, each of which will need to contain an image referenced via a URL. These images will come from a remote server via http.

Using an imagecolumn, with the image source bound to my arraylist containing the URL, the grid does not display until all images are downloaded, which takes some time and causes the UI thread to be unresponsive. I need to add the images asynchronously so that the rest of the row data is visible but the images appear one by one as they are downloaded (as a standard web page would).

How can I best achieve this?

Many thanks.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 17 Jun 2010, 06:59 AM
Hello,

 Can you try to set IsAsynch to true for this column DataMemberBinding to see what will be the result in your case?

Sincerely yours,
Vlad
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.
0
jwhitley
Top achievements
Rank 1
answered on 17 Jun 2010, 10:19 AM
Works a treat - many thanks. The image loading is still rather slow, but at least the grid and all rows appear plus the UI is responsive.

Thanks again, great support as always.
0
jwhitley
Top achievements
Rank 1
answered on 17 Jun 2010, 11:54 AM
Actually I spoke a little too soon. The grid appears instantly and contains rows without images, then the images load asychronously as expected, but the UI is still unusable until all the images have appeared.

Anything further I can try?
0
Vlad
Telerik team
answered on 21 Jun 2010, 08:54 AM
Hello,

 Well, other possible approach will be to try to load these images in a separate thread however in this case you will need a custom column or at least a custom cell template where you can implement your own logic.

Best wishes,
Vlad
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
GridView
Asked by
jwhitley
Top achievements
Rank 1
Answers by
Vlad
Telerik team
jwhitley
Top achievements
Rank 1
Share this question
or