Displaying image in the grid column

2 posts, 1 answers
  1. Nisha
    Nisha avatar
    2 posts
    Member since:
    Aug 2014

    Posted 18 Aug 2014 Link to this post

    Hi,

    I've added GridViewImageColumn and am displaying the image from local path using
    Bitmap.FromFile(this.Value.ToString()); as was specified in one of your links.That is working fine.

    The issue here is that the images can be of varying sizes, hence the row height is not uniform. We need to either generate thumbnails for these images and then display in the column,
    Is there any way to specify the height and width for the Image so that it would resize accordingly without getting truncated.
  2. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3167 posts

    Posted 21 Aug 2014 Link to this post

    Hello Nisha,

    Thank you for writing.

    I think that the GridViewImageColumn.ImageLayout property is suitable for your specific case. When the images have different size and you need to display the entire image content without having differences in the rows height, setting the ImageLayout property to Zoom will zoom the image but the aspect ratio will be preserved. You can find additional information about this property in the GridView >> Columns >> GridViewImageColumn help article.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top