We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the image size in a group grid cell? (no content)

Thread ID:

Created:

Updated:

Platform:

Replies:

68385 Sep 20,2007 12:18 AM UTC Sep 26,2007 01:49 PM UTC WinForms 1
loading
Tags: Grouping
Haishi
Asked On September 20, 2007 12:18 AM UTC

[No content]

Suresh Sekarean [Syncfusion]
Replied On September 26, 2007 01:49 PM UTC

Hi Stanley,

The Style object of Image type cell has a property, 'ImageSizeMode' which indicates how the image will be displayed. If this property is set with 'AutoSize', the image size will be the cell size but keeping Height/width proportionally.

[C#]

private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if (e.Style.CellType == "Image")
{
e.Style.ImageSizeMode = GridImageSizeMode.AutoSize;
//Image will be center in cell
e.Style.ImageSizeMode = GridImageSizeMode.CenterImage;
//Image is displayed with its default size
e.Style.ImageSizeMode = GridImageSizeMode.Normal;
//Image will be stretched to fit with the cell
e.Style.ImageSizeMode = GridImageSizeMode.StretchImage;


//Also we can change the image size by changing the Column Width.
//e.TableCellIdentity.Column.Width = 10;
}
}

Please let us know if you have any further queries.

Regards,
Sureshsekaran.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;