The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
SSSuresh Sekarean Syncfusion Team 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.