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

Show images from directory in Radlistview

3 Answers 190 Views
ListView
This is a migrated thread and some comments may be shown as answers.
David De Backer
Top achievements
Rank 1
David De Backer asked on 24 Aug 2010, 05:10 PM
Hello,
I got a question regarding images and the radlistview. I'd like to show images from a directory into a Radlistview.  I have a directory with the following images: a1.jpg, a2.jpg, b1.jpg, b2.jpg, b3.jpg. On pageload I'd like to get the files containing the letter 'b' (in this case 3 files), and show them in my radlistview.
My question: how can I get these pictures and show them in my listview on pageload?
Thanks for your help.
David  

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 25 Aug 2010, 11:39 AM
Hello David,

You may use System.IO Directory's and File objects static methods for retrieve appropriate files and to populate RadListView and the nested RadBinaryImages. This online demo illustrates a similar approach.

Best wishes,
Rosen
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
Troy Clemons
Top achievements
Rank 1
answered on 04 Nov 2010, 09:43 PM
i tried your demo, but when ever it is converted to use in my web application i get an error Photo is not defined.

Any help Please
0
Veli
Telerik team
answered on 10 Nov 2010, 07:48 AM
Hello Troy,

Photo is a custom data item class that is used to populate RadListView. It's definition is in source file DataProvider.cs / DataProvider.vb in the demo.

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
ListView
Asked by
David De Backer
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Troy Clemons
Top achievements
Rank 1
Veli
Telerik team
Share this question
or