title: Kendo Grids ClientTemplate for ForeignKey column not displaying chosen value?
body: <p>Using <code>MVC</code>, I am trying to implement <code>inline-editing</code> of a <strong>Kendo Grid</strong> using a <code>Foreign Key Column</code>...which should display &amp; save a chosen value from it's relevant <code>ComboBox</code>.</p>
  
  <p>Editing works...but it doesn't display the chosen value upon UPDATING the row.</p>
  
  <ul>
  <li>What am I doing wrong?</li>
  </ul>
  
  <p><strong>MY VIEW CONTROL LOOKS LIKE:</strong> <br/></p>
  
  <pre><code>@(Html.Kendo().Grid&lt;RTUDeviceCustomRegisterModbus&gt;()
                .Columns(columns =&gt;
                {
                    columns.Bound(x =&gt; x.Id)
                        .Visible(false);
                    columns.Bound(x =&gt; x.RTUDeviceId)
                        .Visible(false);
                    columns.Bound(x =&gt; x.Register)
                        .Title("Register")
                        .Width(50);
                    columns.Bound(x =&gt; x.Description)
                        .Title("Description")
                        .Width(100);
                    columns.ForeignKey(x =&gt; x.DataUnitId, Model.DataUnits, "Id", "DataUnitName")
                        .ClientTemplate((@Html.Kendo().ComboBox()
                            .BindTo(Model.DataUnits)
                            .Name("ddlDataUnits_#=Id#")
                            .DataValueField("Id")
                            .DataTextField("DataUnitName")
                            .ToClientTemplate()).ToHtmlString())
                        .Title("Units")
                        .Width(50);
                    columns.ForeignKey(x =&gt; x.DataTypeId, Model.DataTypes, "Id", "DataTypeName")
                        .Title("Data Type")
                        .Width(50);
                    columns.Bound(x =&gt; x.DataTypeSize)
                        .Title("ASCII (size)")
                        .Width(50);
                    columns.Command(command =&gt; { command.Edit(); command.Destroy(); }).Width(100);
                })
                .Name("gridCustomRegisterModbus")
                .ToolBar(toolbar =&gt; toolbar.Create())
                .Editable(editable =&gt; editable.Mode(GridEditMode.InLine))
                .Sortable()
                .Scrollable()
                .BindTo(Model.RTUDeviceCustomRegisterModbuses)
                .DataSource(dataSource =&gt; dataSource.Ajax()
                                                    .ServerOperation(true)
                                                    .PageSize(50)
                                                    .Model(model =&gt; { model.Id(m =&gt; m.Id); })
                                                    .Create(update =&gt; update.Action("Create", "CustomRegisterModbus", new { Area = "Documents" }))
                                                    .Update(update =&gt; update.Action("Update", "CustomRegisterModbus", new { Area = "Documents" }))
                                                    .Destroy(update =&gt; update.Action("Destroy", "CustomRegisterModbus", new { Area = "Documents" }))
                                                    )
                .HtmlAttributes(new { @class = "", @style = "height: 400px;" }))
  </code></pre>
  
  <p><strong>MY ACTION LOOKS LIKE:</strong><br/>
  Yes, it calls the action...but the DataUnitId is NULL.  So, I am guessing I need the client template for that part...but that isn't working.</p>
  
  <pre><code>public class CustomRegisterModbusController : BaseController
  {
      #region &lt;Actions&gt;
  
      [HttpPost]
      public ActionResult Create([DataSourceRequest] DataSourceRequest request, RTUDeviceCustomRegisterModbus entity)
      {
          // It makes the call to CREATE...but the value of the ID is null
  
          return Json(new[] { entity }.ToDataSourceResult(request, ModelState));
      }
  
      [HttpPost]
      public ActionResult Update([DataSourceRequest] DataSourceRequest request, RTUDeviceCustomRegisterModbus entity)
      {
          // Do awesome stuff
          return Json(new[] { entity }.ToDataSourceResult(request, ModelState));
      }
  
      [HttpPost]
      public ActionResult Destroy([DataSourceRequest] DataSourceRequest request, RTUDeviceCustomRegisterModbus entity)
      {
          // Do awesome stuff
          return Json(new[] { entity }.ToDataSourceResult(request, ModelState));
      }
  
      #endregion
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/fFV7U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fFV7U.png" alt="enter image description here"></a></p>