How to show images from database in a ListView.

4 posts, 0 answers
  1. Nick
    Nick avatar
    2 posts
    Member since:
    Mar 2013

    Posted 16 Apr 2013 Link to this post

    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
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 18 Apr 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Nick
    Nick avatar
    2 posts
    Member since:
    Mar 2013

    Posted 23 Apr 2013 Link to this post

    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
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 25 Apr 2013 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready