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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

68385 Sep 19,2007 08:18 PM Sep 26,2007 09:49 AM Windows Forms 1
loading
Tags: Grouping
Haishi
Asked On September 19, 2007 08:18 PM

[No content]

Suresh Sekarean [Syncfusion]
Replied On September 26, 2007 09:49 AM

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.

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.

;