title: display image devexpress gridview, is this a rocket science?
body: <p>Let say I have ViewModel which I use in devexpress gridview. Inside that view I display my data in devexpress gridview like this</p>
  
  <pre><code>@Html.DevExpress().GridView(
      settings =&gt;
      {
          settings.Name = "myGridView";
          settings.KeyFieldName = "Id";
  ....
      var column = settings.Columns.Add("Id", "Id");
      column = settings.Columns.Add("Title", "MyTitle");
      ...    
      }).Bind(Model).GetHtml()
  </code></pre>
  
  <p>My Model is of IEnumerable
  and everything is ok with this code up.
  Now I want to display image inside that gridview before or after Id column.
  So I found that this should be done with <code>Html.DevExpress().BinaryImage()</code>
  But I'm stuck here for a while now.
  First to describe my viewmodel and how my images are stored.
  My Model have <code>List&lt;Photo&gt;</code> collection. I'm getting images as <code>FileContentResult</code>.</p>
  
  <p>So I know I should use this <code>Html.DevExpress().BinaryImage()</code> but I dont know.
  Here is example which I should follow.</p>
  
  <pre><code>column = settings.Columns.Add("", "Photos");
          Html.DevExpress().BinaryImage(
              imageSettings =&gt;
              {
                  //imageSettings.Name = "Photo";
                  imageSettings.Width = 100;
                  imageSettings.Height = 100;
              })
              .Bind(((System.Data.Linq.Binary)DataBinder.Eval(Model, "Photo")).ToArray())
              .Render();
  </code></pre>
  
  <p><strong>Update:</strong>
  I think I should try with this solution. Problem here is that I want to display in my grid first image from the Photos collection. I tried with with code below but with no luck. No errors.</p>
  
  <pre><code>var photoColumn = settings.Columns.Add("Photos[0].ImageData", "Foto");
          photoColumn.Visible = true;
          photoColumn.Width = 20;
          photoColumn.FieldName = "Photo.ImageData";
          photoColumn.ColumnType = MVCxGridViewColumnType.BinaryImage;
          DevExpress.Web.ASPxEditors.BinaryImageEditProperties properties = (DevExpress.Web.ASPxEditors.BinaryImageEditProperties)photoColumn.PropertiesEdit;
          properties.ImageHeight = 50;
          properties.ImageWidth = 50;
  </code></pre>