title: Kendo grid with DropDown, iterate grid setting drop down values
body: <p>I am working with ASP.NET MVC3, Jquery, &amp; Kendo UI.</p>
  
  <p>Here is a clip of how my grid is setup (I removed all irrelevant fields):</p>
  
  <pre><code>Html.Kendo()
      .Grid&lt;MyProject.Models.Domain.Students&gt;()
      .Name("Students")
      .Sortable(settings =&gt; settings.Enabled(false))
      .Filterable(settings =&gt; settings.Enabled(false))
      .Resizable(resizing =&gt; resizing.Columns(true))
      .Scrollable(settings =&gt; settings.Enabled(true))     
      .HtmlAttributes(new { style = "font-size: 85%;" })
      .Columns(columns =&gt;
          {
              columns.Bound(o =&gt; o.StudentId).Title("StudentId").Hidden();
              columns.Bound(o =&gt; o.Name).Title("Student Name").Width(200);
              columns.Bound(o =&gt; o.teacher).Title("Teacher")
                   .ClientTemplate("#=data.teacher ? teacher.teacherName : ''#").Width(150).Filterable(false);
          })
          .DataSource(dataSource =&gt; dataSource.Ajax()
                                              .Batch(true)
                                              .ServerOperation(false)
                                              .Model(model =&gt;
                                                  {
                                                      model.Id(c =&gt; c.StudentId);
                                                      model.Field(c =&gt; c.teacher);                                                       
                                                  })
                                                  .Events(events =&gt; events.Error("Field_onError"))
                                                  .Read(read =&gt; read.Action("_AjaxGetFields", "Student"))
                                                  .Update("_AjaxUpdateFields", "Student")
                                                  .Destroy("_AjaxDelFields", "Student"))
          .Events(events =&gt; events.DataBound("Fields_onDataBound")
                                  .Change("onFieldSelect")
                                  .Edit("onFieldEdit")
                                  )
          .ToolBar(commands =&gt;
              {
                  commands.Save().HtmlAttributes(new { id = "saveField" }); 
              })
          .Scrollable(scrollable =&gt; scrollable.Height("375px"))
          .Selectable()
          .Editable(editing =&gt; editing.Mode(Kendo.Mvc.UI.GridEditMode.InCell)).Render();
  </code></pre>
  
  <p>Here is the template for the teacher drop down:</p>
  
  <pre><code>@(Html.Kendo().DropDownList()
      .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
      .DataValueField("TeacherId")       
      .DataTextField("TeacherName")
      .DataSource(source =&gt;
      {
          source.Read(read =&gt;
          {
              read.Action("_SelectTeacherList", "Teacher").Data("onTeacherDataBinding");
          }).ServerFiltering(true);
      })
      .Events(e =&gt; e           
          .Change("dropdownlist_change")
          )
  )
  </code></pre>
  
  <p>I have another drop down on the page that is not on the grid.  I have a jquery function that gets executed every time the drop down changes.  The drop down is a list of teachers.  When it changes I want to set the teacher column of every row of the grid to the same value and text pair that was selected in the drop down.</p>
  
  <p>Here is what I have so far, you can see where the comment is that I need to put some code.  I am not sure how to do this:</p>
  
  <pre><code>function teachers_change()
  {
      var teacherDL = $("#allTeach").data("kendoDropDownList");
      teachid = teacherDL.value();
      teachName = teacherDL.text();
  
      $("#Students tr").each(function ()
      {
          var tr = this;
          var cells = tr.cells;
          //RIGHT HERE IS WHERE I WANT TO GET A REFERENCE TO THE DROP DOWN 
          //AND SET THE VALUE TO teachid AND THE TEXT TO teachName
      });
  }
  </code></pre>