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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Image column

Thread ID:





120513 Sep 22,2015 10:16 AM UTC Sep 23,2015 10:20 AM UTC ASP.NET MVC 1
Tags: Grid
Asked On September 22, 2015 10:16 AM UTC

Hi, is it possible to add an image column without using a template with a tag <img> and a relative path, but bounding directly the column to a property of type byte[] ?


Gowthami V [Syncfusion]
Replied On September 23, 2015 10:20 AM UTC

Hi Fabio,

Thanks for contacting Syncfusion support.

We could not render the image without <img> tag as it is necessary while using an image in Html.

For your requirement, we can encode your image byte array in base 64 as follows,

<script type="text/x-jsrender" id="columnTemplate">

         <img src='data:image/jpeg;base64,{{:Photo}}' />



. . . .

.Columns(col =>


            col.HeaderText("Employee Image").Template(true).TemplateID("#columnTemplate").TextAlign(TextAlign.Center).Width(110).Add();

. . . .

. . . .



Please refer to the below link for more clarification,


Gowthami V.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon