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.
I''m trying to center a .bmp image in a cell in a GridControl grid. Know there been several posts about this, but I''m not able to get it working right, the image is always left-aligned in the cell. I''m using version 3.2.1.0.
This is my code:
theGrid[i+1,1].CellType = "Static";
theGrid[i+1,1].ImageList = ((MainForm)TopLevelControl).MiscImages;
theGrid[i+1,1].ImageIndex = 0;
theGrid[i+1,1].HorizontalAlignment = GridHorizontalAlignment.Right;
theGrid[i+1,1].ImageSizeMode = GridImageSizeMode.CenterImage;
ADAdministrator Syncfusion Team September 2, 2005 10:26 AM UTC
By default, setting the CellType to Image aligns the Image to the center. For setting the Horizontal alignment of the Image, you need to set the GridImageSizeMode to either Normal / AutoSize.
GridStyleInfo style ;
style = this.gridControl1[1,3];
style.CellType = "Image";
style.ImageList = imageList1;
style.ImageIndex = 2;
style.ImageSizeMode=GridImageSizeMode.Normal;
style.HorizontalAlignment=GridHorizontalAlignment.Center;
GAGeir AamodtSeptember 2, 2005 12:28 PM UTC
Ah, thanks Jeba for quick and accurate solution!
ADAdministrator Syncfusion Team September 2, 2005 02:05 PM UTC
Hi Geir,
Thank you for your update. We appreciate your interest in Syncfusion Prodcuts.
Best Regards,
Jeba