title: Icon in kendoUI grid column in MVC application (using MVC wrappers)
body: <p>I have a page in ASP.NET MVC app, made with KendoUI
  The page has a hierarchical grid (as at the link below)</p>
  
  <p><a href="http://demos.kendoui.com/web/grid/hierarchy.html" rel="nofollow">http://demos.kendoui.com/web/grid/hierarchy.html</a></p>
  
  <p>Code works fine.</p>
  
  <p>The details grid is bound to following class</p>
  
  <pre><code>public class ScheduledInspectionInfo
  {
      public ScheduledInspectionInfo();
  
      public string CommandName { get; set; }
      public string IconPath { get; set; }
      public int InspectionID { get; set; }
      public DateTime PeriodEndDate { get; set; }
      public int PeriodNo { get; set; }
      public DateTime PeriodStartDate { get; set; }
      public int PermitID { get; set; }
  }
  </code></pre>
  
  <p>The IconName field contains name of an icon I need to show in grid.
  But I cannot make it work</p>
  
  <p>If I define the grid as below:</p>
  
  <pre><code>Html.Kendo().Grid&lt;MyPermitNow.ScheduledInspectionInfo&gt;()
      .Name("grid_#=PermitID#")   
      .Columns(columns =&gt;
      {
          columns.Bound(p =&gt; p.PeriodNo).Title("No.").Width(200);
          columns.Bound(p =&gt; p.PeriodStartDate).Format("{0:d}").Width(200);
          columns.Bound(p =&gt; p.PeriodEndDate).Format("{0:d}").Width(200);
          columns.Bound(p =&gt; p.IconPath).Title("Status");
      })
      .DataSource(dataSource =&gt; dataSource
          .Ajax()
          .PageSize(5)        
          .Read(read =&gt; read.Action("HierarchyBinding_SearchDetail", "Septic", new { permitID = "#=PermitID#" }))
      )
      .Pageable()
      .Sortable()
      .ToClientTemplate() 
  </code></pre>
  
  <p>the Status column shows the icon name</p>
  
  <p>But if I change Status column definition as below</p>
  
  <pre><code>columns.Bound(p =&gt; p.IconPath).Title("Status").ClientTemplate("&lt;img src='#= IconName #' /&gt;");
  </code></pre>
  
  <p>It gives me JavaScript error:</p>
  
  <pre><code>ReferenceError: IconName is not defined
  </code></pre>
  
  <p>when trying to expand master row to see details</p>
  
  <p>Any idea what can be wrong?</p>
  
  <p>Thank you</p>