Search This Blog

Thursday, February 13, 2014

Add Image Column to Telerik Radgrid

Telerik > RadGridView > GridViewImageColumn

GridViewImageColumn displays read-only images for database columns of image data





GridViewImageColumn imageColumn = new GridViewImageColumn();
imageColumn.Name = "imgCol";
imageColumn.FieldName = "dbPhoto";
imageColumn.HeaderText = "Picture";
imageColumn.ImageLayout = ImageLayout.Zoom; // Zoom - Image is zoomed but the aspect ratio is preserved:
radGridView1.MasterTemplate.Columns.Insert(3, imageColumn);