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

Picture Stretch

1 Answer 123 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 04 Nov 2008, 01:15 PM
We have our grid working very nicely now. Just one issue I need to work through.

Is there any way to stop a picture stretching out of proportion? I need to allow the picture to grow if column and row size is increased but keep the proportions.

Any help much appreciated.




1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 07 Nov 2008, 01:41 PM
Hi David,

Thank you for your question.

You have to use the ImageLayout propery of an GridViewImageColumn. The easiest way to edit that is from the Properties windows--> MasterGridViewTamplate-->Columns property and then the ImageLayout property of the image column.


private void Form1_Load(object sender, EventArgs e) 
{             
((GridViewImageColumn)this.radGridView1.MasterGridViewTemplate.Columns[4]).ImageLayout = ImageLayout.Stretch; 


Do not hesitate to contact me back if you have more questions.

Sincerely yours,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
David
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or