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

How to show images from database in a ListView.

3 Answers 307 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 16 Apr 2013, 03:29 PM
Hi 

I have a listview for students, and the images of the students are stored in the database. how do i render those in the listview?

Any help is appreciated. 

Thanks,
Nick

3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 18 Apr 2013, 07:59 AM
Hello Nick,

How images are stored in the DataBase? Are you able to display them via standard Ajax request/HTML elements?

Generally speaking, if the images are stored as URLs you can easily display them through the ListView template as demonstrated in this demo. Please pay attention to the template definition:
<script type="text/x-kendo-tmpl" id="template">
    <div class="twit">
        <img width="48" height="48" src="#:profile_image_url#" alt="#:from_user#" />
        <p>#:text#</p>
    </div>
</script>


Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Nick
Top achievements
Rank 1
answered on 23 Apr 2013, 04:39 PM
Hi Alexander, 

The images are stored in the db(oracle) as blob. Can you/smone please guide me how to display a blob?

thanks,
Nick
0
Alexander Valchev
Telerik team
answered on 25 Apr 2013, 06:36 AM
Hi Nick,

I am afraid that your question is not directly related to Kendo UI and as such is out of the scope of our standard support services. My recommendation is to search the web for tutorials that explain how to display images stored in blob format in an HTML page.

If you are able to display the image using JavaScript/jQuery and standard HTML elements, but still have troubles to visualize them inside the ListView control, please provide us with a small example that isolates the issue and we will do our best to help. Thank you in advance.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView
Asked by
Nick
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Nick
Top achievements
Rank 1
Share this question
or