title: Kendo UI Grid incell edit with client template - Razor view
body: <p>i am using kendo grid Q2 2014 and i want to use client template in cell edit mode. But it not work as i want . I need to click into that cell in order to get into edit mode.
  Here is my grid .</p>
  
  <pre><code>@(Html.Kendo().Grid&lt;AdminProject.Common.ViewModels.ProjectActivityViewModel&gt;()
                    .Name("gridName")
                    .Columns(columns =&gt;
                    {
                        columns.Bound(d =&gt; d.ResourceName);
                        columns.Bound(d =&gt; d.TotalHours).Title("Total Hours").Width(150).ClientFooterTemplate("Sum: #=sum#");
                        columns.Bound(d =&gt; d.TotalCost).Title("Total Cost").Format("{0:c0}").Width(150).ClientFooterTemplate("Sum: #= kendo.toString(sum, 'c0')#");
                        columns.Bound(d =&gt; d.Hours)
                            .ClientTemplate(Html.Kendo().TextBox().Name("NewHours").ToClientTemplate().ToHtmlString());
  
  
                    })
                    .Editable(editable =&gt; editable.Mode(GridEditMode.InCell))
                    .ToolBar(toolbar =&gt;
                    {
                        toolbar.Save(); // The "save" command saves the changed data items
                    })
                   .Pageable(pageable =&gt; pageable
                          .Refresh(true)
                          .PageSizes(true)
                          .ButtonCount(5)
                          )
                  .Sortable()
                  .Events(e =&gt; e.Edit("onEdit"))
                  .AutoBind(true)
                  .DataSource(dataSource =&gt; dataSource
                  .Ajax()
                  .Batch(true)
                  .PageSize(10)
                          .Aggregates(aggregates =&gt;
                              {
                                  aggregates.Add(p =&gt; p.TotalHours).Sum();
                                  aggregates.Add(p =&gt; p.TotalCost).Sum();
                              })
                  .Events(events =&gt; { events.Error("error_handler").Sync("sync_handler"); })
                  .ServerOperation(true)
                  .Model(model =&gt;
                  {
                      model.Id(product =&gt; product.ResourceId); // Specify the property which is the unique identifier of the model
                      model.Field(product =&gt; product.TotalHours).Editable(false);
                      model.Field(product =&gt; product.TotalCost).Editable(false);
                      model.Field(product =&gt; product.ResourceName).Editable(false);
                  })
                  .Read(read =&gt; read.Action(AdminProject.Common.Constants.ActionNames.GetDetail, AdminProject.Common.Constants.ControllerNames.Project).Data("additionalData"))
                  .Update(update =&gt; update.Action(AdminProject.Common.Constants.ActionNames.UpdateActivity, AdminProject.Common.Constants.ControllerNames.Project).Data("additionalData2"))
                          .Sort(sort =&gt; sort.Add(s =&gt; s.ResourceId).Ascending())
                          ))
  </code></pre>
  
  <p>Sorry , i can not post the photo so i uploaded it into another host .</p>
  
  <p>Before <a href="http://postimg.org/image/44ikjewvt/" rel="nofollow">enter link description here</a></p>
  
  <p>After <a href="http://postimg.org/image/9di6v14op/" rel="nofollow">enter link description here</a></p>