title: MVC Kendo Grid - Uncaught TypeError: Cannot read property 'id' of undefined
body: <p>I have a Kendo Grid and template column</p>
  
  <pre><code>columns.Template(t =&gt; t.id)
      .ClientTemplate("&lt;button style='margin:2px' type='button' class='btn btn-success btn-xs' data-toggle='tooltip' data-placement='left' title='Change' onclick='getID()'&gt;&lt;span class='glyphicon glyphicon-cog'&gt;&lt;/span&gt;&lt;/button&gt;")
      .Width(30)
      .HtmlAttributes(new { @style = "text-align:center" });
  </code></pre>
  
  <p>And</p>
  
  <pre><code>function getID(e) {
      debugger;
      var grid = $("#Grid").data("kendoGrid");
      var model = model.id
      alert(model.id);
  }
  </code></pre>
  
  <p>I'm just getting this error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'id' of undefined. </p>
  </blockquote>
  
  <p>Why? What can I do to get a model ID where the button is clicked?</p>