title: Telerik MVC Grid ClientTemplate Issue
body: <p>Alright I need some help with this. I've reviewed a few other answers that pertain to my issue but didn't resolve it.</p>
  
  <p>I am trying to add an action image to a grid row in a Telerik MVC client template. </p>
  
  <p>The issue I am having is I cannot get the ID from the column the client template is for.</p>
  
  <p>Here is my grid:</p>
  
  <pre><code>@(Html.Telerik().Grid&lt;xxx.Business.Entities.EntityName&gt;()
      .Name("StudentSearchResults")
      .Columns(columns =&gt;
      {
          columns.Bound(o =&gt; o.SchoolStudentID);
          columns.Bound(o =&gt; o.FirstName);
          columns.Bound(o =&gt; o.LastName);
          columns.Bound(o =&gt; o.StudentID).ClientTemplate(
              @Html.ActionImage("SubmitDegree", new { studentID = "&lt;#= StudentID #=&gt;" }, "~/Content/Images/Icons/16/bullet_go.png", "Submit Degree").ToString()
              ).Title("")
              .Width(20);
      })
      .DataBinding(databinding =&gt; databinding
      .Ajax()
      .OperationMode(GridOperationMode.Client)
      .Select("AjaxBindAction", "ControllerName"))
      .Pageable()
      .Sortable()
  </code></pre>
  
  <p>)</p>
  
  <p>And I am using an HtmlHelperExtension to construct the ActionImage:</p>
  
  <pre><code>public static MvcHtmlString ActionImage(this HtmlHelper html, string action, object routeValues, string imagePath, string alt)
      {
          var url = new UrlHelper(html.ViewContext.RequestContext);
  
          // build the &lt;img&gt; tag
          var imgBuilder = new TagBuilder("img");
          imgBuilder.MergeAttribute("src", url.Content(imagePath));
          imgBuilder.MergeAttribute("alt", alt);
          string imgHtml = imgBuilder.ToString(TagRenderMode.SelfClosing);
  
          // build the &lt;a&gt; tag
          var anchorBuilder = new TagBuilder("a");
          anchorBuilder.MergeAttribute("href", url.Action(action, routeValues));
          anchorBuilder.InnerHtml = imgHtml; // include the &lt;img&gt; tag inside
          string anchorHtml = anchorBuilder.ToString(TagRenderMode.Normal);
  
          return MvcHtmlString.Create(anchorHtml);
      }
  </code></pre>
  
  <p>I also tried setting a server side template and then a client side one.. as posted <a href="https://stackoverflow.com/questions/6918402/telerik-mvc-grid-clienttemplate-checkbox-not-displayed-initially">here</a></p>
  
  <pre><code>@(Html.Telerik().Grid&lt;AIPortal.Business.Entities.EntityName&gt;()
      .Name("StudentSearchResults")
      .Columns(columns =&gt;
      {
          columns.Bound(o =&gt; o.SchoolStudentID);
          columns.Bound(o =&gt; o.FirstName);
          columns.Bound(o =&gt; o.LastName);
          columns.Bound(o =&gt; o.StudentID).Template(t =&gt; {
                      @Html.ActionImage("SubmitDegree", new { studentID = t.StudentID }, "~/Content/Images/Icons/16/bullet_go.png", "Submit Degree");
                       })
                       .ClientTemplate(
                       @Html.ActionImage("SubmitDegree", new { studentID = "&lt;#= EntityName.StudentID #&gt;" }, "~/Content/Images/Icons/16/bullet_go.png", "Submit Degree").ToString())
              .Title("")
              .Width(20);
      })
      .DataBinding(databinding =&gt; databinding
      .Ajax()
      .OperationMode(GridOperationMode.Client)
      .Select("AjaxBindAction", "DegreeCompletion"))
      .Pageable()
      .Sortable()
  </code></pre>
  
  <p>)</p>
  
  <p>thinking it might be an issue with the @Html.ActionImage running on the server in the client template?</p>
  
  <p>I am able to hard code the StudentID and everything works fine. The only problem is when trying to get access to the StudentID that the client template is for.</p>
  
  <p>Can somebody point me in the right direction to get this ID into my client template?</p>
  
  <p>Thanks!!</p>