PictureBox in GridView

2 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
    705 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 >>
Back to Top