title: Telerik MVC Combobox in Grid based off row values?
body: <p>I need to have a Telerik MVC grid with a combobox (in edit mode) that is populated based on criteria in each row.  So when I click edit on one row, the resulting combobox will have items in it that will be different than the translator combobox in other rows.  I figured this row should be loaded on demand, but I can't figure out how to create a combobox in a grid without an editor template.  It looks like I can't pass parameters to an editor template.</p>
  
  <p>Here's the use case for this:
  Imagine I have a list of languages with translators in a grid.  When editing each row, a translator combobox would be displayed with only translators for that particular language.  So French will have a translator combobox with names like Pierre, Francois, and Jacque, but Spanish will have names like Jose, Mario, and possibly Pierre because he speaks both French and Spanish.</p>
  
  <p>Any ideas on how to achieve this with Telerik MVC Grid and Combobox?</p>
  
  <p>Thanks in advance, 
  Steve</p>
  
  <p><strong>UPDATE:</strong>
  Atanas, 
  Any chance you can provide a working example?  I get errors.  Here is my javascript based on your code:</p>
  
  <pre><code>function TaskGrid_OnEdit(e) 
  {
      var combobox = $(e.row).find("#ComboBoxId").data("tComboBox");
      //var values = getValuesForDataItem(e.dataItem); // get the values for the current data item      
  
      var values =
          [
              { Text:"Product 1", Value:"1" },
              { Text:"Product 2", Value:"2" },
              { Text:"Product 3", Value:"3" },
          ];
      combobox.dataBind(values); // fill the combobox
  }
  </code></pre>
  
  <p>Here is the editor template, I don't bind it to anything here:</p>
  
  <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;Model.Data.tblJobTask&gt;" %&gt;
  
  &lt;%: Html.Telerik().DropDownListFor(s =&gt; s.SupplierID).Name("ComboBoxId") %&gt;
  </code></pre>
  
  <p>By the way, the model in your editor template doesn't map to any models you have in the solution.  Should the model there be mapped to the data you are populating the combo with or the model of the list that's populating the grid?</p>
  
  <p>Steve</p>