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

Displaying image in the grid column

1 Answer 878 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nisha
Top achievements
Rank 1
Nisha asked on 18 Aug 2014, 03:25 PM
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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Aug 2014, 02:40 PM
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.
 
Tags
GridView
Asked by
Nisha
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or