Is there anyway that you can allow the images in the gridview control to size to their original size rather than get resized to a much smaller size by the gridview control? I have some images that are 100 px by 100px and I want them to show up in the grid as that size.
Thanks in advance!
1 Answer, 1 is accepted
0
Peter
Telerik team
answered on 15 Aug 2007, 01:18 PM
Hi Brad Hanson,
Thank you for the feedback. Unfortunately RadGridView does not support this type of image resize yet. As a workaround I can suggest dynamically turning off image stretching using the following code:
First: You should subscribe to RadGridView CellFormating event:
this.radGridView1.CellFormatting += new Telerik.WinControls.UI.CellFormattingEventHandler( this.radGridView1_CellFormatting );
Second: Implement radGridView1_CellFormatting function private void radGridView1_CellFormatting( object sender, CellFormattingEventArgs e ) { if (e.CellElement is GridImageCellElement) { ( e.CellElement as GridImageCellElement ).ImagePosition = Telerik.WinControls.ImagePositions.Center; } }