title: How to Get Model Values in DataCellTemplate() of Kendo-PivotGrid-MVC
body: <pre><code>@(Html.Kendo().PivotGrid&lt;Models.MyModel&gt;()
  .Name("pivotgrid")
  .DataSource(dataSource =&gt; dataSource.Ajax()
    .Transport(transport =&gt; transport.Read("ActionMethod", "Controller"))
    .Schema(schema =&gt; schema.Cube(cube =&gt; cube.Dimensions(dimensions =&gt;
    {
        dimensions.Add(model =&gt; model.FirstName).Caption("Learner");
        dimensions.Add(model =&gt; model.CompetencyCode).Caption("Competency Codes");
        dimensions.Add(model =&gt; model.OutComeRTOCode).Caption("OutCome RTO");
        dimensions.Add(model =&gt; model.StudentId);
        dimensions.Add(model =&gt; model.GroupId);
        dimensions.Add(model =&gt; model.CompetencyId);
    })
  
        .Measures(measures =&gt; measures.Add("OutComeRTOCode Count").Field(model =&gt; model.OutComeRTOCode).AggregateName("Count").Field(a =&gt; a.StudentId).Field(a =&gt; a.GroupId).Field(a =&gt; a.EnrolmentId).ToString())
  
        ))
        .Columns(columns =&gt; { columns.Add("CompetencyCode").Expand(true); })
        .Rows(rows =&gt; rows.Add("FirstName").Expand(true))
                  .Rows(rows =&gt; rows.Add("StudentId"))
                  .Rows(rows =&gt; rows.Add("GroupId"))
                  .Rows(rows =&gt; rows.Add("CompetencyId"))
        .Measures(measures =&gt; measures.Values("OutComeRTOCode Count")))
       .DataCellTemplate("&lt;a onclick='GroupEnrolment(StudentId)'&gt;#:kendo.toString(dataItem.value)#&lt;/a&gt;")
  )
  </code></pre>
  
  <p>Here in the code ,i am trying to get the StudentId in DataCellTemplate('&lt;'a onclick='<strong>GroupEnrolment</strong>(<em>Want to Pass StudentId as Parameter here</em> <strong>)</strong>'>'#:kendo.toString(dataItem.value)#'&lt;'/a'>').</p>
  
  <p>And trying to Pass StudentId in <strong>GroupEnrollment(StudentId)</strong> as argument, i don't know how to get StudentId from Model and pass it to function-GroupEnrollment in anchor tag.
  Or is there any other way to create a link in cells of the Kendo Pivot Grid. 
  Any help will be appreciated.
  Thanks in Advance .</p>