$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Data Grid WinForms Control
Create data gird view in C# with modern user interface for your Windows Forms applications
Home > WinForms UI Controls > User Manual > Image Column in C#

C# Grid Image Column

The Kettic Data Grid Control uses the Data Grid Column objects to represent columns. The Kettic Data Grid Column is the base class of all types of grid columns, including the Grid Image Column. The Grid Image Column descends all features of the Kettic Data Grid Column parent class. So the Grid Image Column shares all properties of Data Grid Control class and provides styling and C# events for building entire gird Image column in Windows Forms C# applications.

Generate Grid Image Column in C#

The Kettic Grid Image Column is able to display the read only images for database columns of image data. The Grid Image Column support image formats that the .net framework supports. To add the grid image column to Data Grid Control in C# projects, we can use the C# code snippet below.

GridImageColumn imageColumn = new GridImageColumn();
imageColumn.Name = "ImageColumn";
imageColumn.FieldName = "Photos";
imageColumn.HeaderText = "Pictures";
imageColumn.ImageLayout = ImageLayout.Zoom;
ketticGrid.MasterTemplate.Columns.Insert(4, imageColumn);

Sizing Image Column in C#

The Kettic Grid Image Column offers the implementation of sizing the column to display images. This is achieved by configuring the property, Image Layout, whose valid value includes None, Tile, Center, Stretch, and Zoom. The following samples show how to size the image column in C# code.

Set Image Column to None in C#

The None value will place the image at upper left corner of the cell in column and can be used together with the Image Alignment property to set the place of an image in a cell.

imageColumn.ImageLayout = ImageLayout.None;
imageColumn.ImageAlignment = ContentAlignment.BottomRight;

Set Image Column to Tile in C#

The Tile value will repeat the image in cells in the column.

imageColumn.ImageLayout = ImageLayout.Tile;

Set Image Column to Center in C#

The Center value will place the image at center in a cell in the column.

imageColumn.ImageLayout = ImageLayout.Center;

Set Image Column to Stretch in C#

The Stretch value will stretch the image in the cell in grid column.

imageColumn.ImageLayout = ImageLayout.Stretch;

Set Image Column to Zoom in C#

The Zoom value is able to zoom image in the cell with preserved ratio

imageColumn.ImageLayout = ImageLayout.Zoom;
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls