PictureBox in GridView

4 posts, 0 answers
  1. Moritz
    Moritz avatar
    1 posts
    Member since:
    Jun 2012

    Posted 28 Jun 2012 Link to this post

    Hi everybody,

    I hava a long list with DB entries which contains a URL to a related picture. Now I want display all the information in a Gridview and give the user the opportunity to get a preview of the picture at mouseover. Unforunally the ImageColumn loads the pictures syncronous, so the GUI will only show up when all pictures are downloaded and there are no mouseover-events.

    Picturebox loads the pictures in the background and supoorts mouseover events. Now I want a pictureBox Control in a GridView-Cell... is this possible? And if yes, how?

    Thank you for your assistance.
  2. Ivan Petrov
    Ivan Petrov avatar
    718 posts

    Posted 03 Jul 2012 Link to this post

    Hello Moritz,

    Thank you for writing.

    Putting PictureBoxes in RadGridView will not make the grid load the images asynchronously. Additionally it is not recommended to nest controls within RadControls. RadControls are composed of elements and it is preferable that you nest only elements within them.
    What you can do, is to show the picture in a screen tip or create a custom cell element that would load the images asynchronously. I have attached a sample project which demonstrates how a custom cell element could load the images asynchronously and cache them.

    I hope this will be useful for you. Should you have further questions, I would be glad to help.
    Kind regards,
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  3. Ali
    Ali avatar
    1 posts
    Member since:
    Sep 2020

    Posted 12 Sep 2020 in reply to Ivan Petrov Link to this post

    The example is giving an error, even when run the exe file
  4. Nadya
    Nadya avatar
    504 posts

    Posted 16 Sep 2020 Link to this post

    Hello, Ali,

    The project does not run since this is quite an old post and the referred web images are not available anymore. Feel free to replace the old URLs with new existing ones and the project will run as expected demonstrating RadGridView with images loaded asynchronously.

    Please let me know if I can assist you further.

    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Back to Top