title: How to set value of a cell while inline editing in a Kendo MVC Grid based on a dropdownlist selection?
body: <p>Hope the title makes sense. So I have a grid with just three columns, the idea is that when adding a new row, the first column is a dropdown for a complex type, and I want the second column to show a value from the dropdown selection dynamically, and the third column is just a text box.
  I have read through a several other posts both here and Telerik's own forum, and no solution really works. Maybe it does, it just doesn't update the view. It would be nice if it was as easy as cascading multiple dropdownlists, just cascade into a textbox instead.</p>
  
  <p>Here is the grid, it's pretty standard:</p>
  
  <pre><code>@model Guid 
  @(Html.Kendo().Grid&lt;ConfigurationParameterSelectorViewModel&gt;()
      .Name("configurationParameterSelectorGrid_" + Model)
      .ToolBar(t =&gt;
      {
          t.Create().Text(GetText(Constant.ADD, Constant.TEXT_GLOBAL));
      })
      .Columns(columns =&gt; {
          columns.Bound(c =&gt; c.Id).Visible(false);
          columns.Bound(c =&gt; c.ConfigurationKey).ClientTemplate("#=ConfigurationKey.Text#");
          columns.Bound(c =&gt; c.DefaultValue);
          columns.Bound(c =&gt; c.CurrentValue);
      })
      .DataSource(dataBinding =&gt; dataBinding
          .Ajax()
          .PageSize(20)
          .Model(model =&gt;
          {
              model.Id(c =&gt; c.Id);
              model.Field(e =&gt; e.ConfigurationKey).DefaultValue(new CheckBoxItem());
              model.Field(f =&gt; f.DefaultValue).Editable(false);
          })
          .Read(read =&gt; read.Action("GetConfigurationParametersSelector", "ConfigurationParameter", new { OrgSiteZoneId = Model }))
          .Create(create =&gt; create.Action("AddConfigurationParameterToSite", "ConfigurationParameter", new { OrgSiteZoneId = Model }))
      )
      .Filterable()
      .Navigatable()
      .Scrollable(s =&gt; s.Height("auto"))
      .DefaultGridSettings()
  )
  </code></pre>
  
  <p>The model used in the grid, it is the "DefaultValue" property I want to update dynamically based on a property from the dropdownlist model:</p>
  
  <pre><code>public class ConfigurationParameterSelectorViewModel
  {
      public ConfigurationParameterSelectorViewModel(){ }
  
      [ScaffoldColumn(false)]
      public int Id { get; set; }
      [UIHint("ConfigurationParametersDropDownEditor")]
      public CheckBoxItem ConfigurationKey { get; set; } // CheckBoxItem model is just used temporarily
      //[Editable(false)]
      public string DefaultValue { get; set; }
      public string CurrentValue { get; set; }
  }
  </code></pre>
  
  <p>The dropdownlist editor:</p>
  
  <pre><code>@(Html.Kendo().DropDownListFor(m =&gt; m)
      .DataValueField("Value")
      .DataTextField("Text")
      .DataSource(source =&gt; source
          .Custom()
          .Transport(transport =&gt; transport
              .Read(read =&gt;
              {
                  read.Action("GetConfigurationParametersForDropDown", "ConfigurationParameter", new { Area = "Setup" });
              })
          )
      .ServerFiltering(true))
      .AutoWidth(true)
      .Events(e =&gt; e.Select("onConfigurationParametersEditorSelect")) )
  </code></pre>
  
  <p>and finally, the javascript where I try to take the value from the selected item in the dropdownlist and update the "DefualtValue" property in the model:</p>
  
  <pre><code>function onConfigurationParametersEditorSelect(e) {
              var grid = e.sender.element.closest(".k-grid").data("kendoGrid");
              var row = e.sender.element.closest("tr");
              var dataItem = grid.dataItem(row);
              dataItem.DefaultValue = "this should be a value from the dropdownlist";
          }
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>