title: Kendo Read Action - getting the control Id
body: <p>I have a partial view using a Kendo DropDownListFor and within the Datasource Read action I am passing a function name to get additional parameters eg.</p>
  
  <pre><code>@(Html.Kendo().DropDownListFor(m =&gt; m.AssignedUserId)
      .OptionLabel("Assign to ...")
      .DataTextField("FullName")
      .DataValueField("UserId")
      .Filter(FilterType.StartsWith)
      .AutoBind(true)
      .DataSource(source =&gt; {
          source.Read(read =&gt; { **read.Action("GetStaffList", "ManageUser").Data("filterAssigned");** })
              .ServerFiltering(true);
      })
  )
  
  function filterAssigned(e) {
      // Selector needs to be prefixed "Create_" or "Update_" depending on view/HtmlFieldPrefix.
      var ctl = $("#AssignedUserId").data("kendoDropDownList");
      return {
          staffFilter: (ctl.filterInput.val() || 'empty'),
          selectedId: (ctl.value() || 0)
      };
  }
  </code></pre>
  
  <p>Within the "FilterAssigned" function I want to get the Id of the control rather than hardcoding <code>$("#AssignedUserId").data("kendoDropDownList")</code>. This is because when creating the View, I am setting the <code>ViewData.TemplateInfo.HtmlFieldPrefix = "Create"</code> so the actual control id is rendered as "Create_AssignedUserId" and I want to use the same function for Create, Update etc.</p>
  
  <p>I have tried the usual options:</p>
  
  <pre><code>this.id
  this.attr('id')
  this.element.attr('id')
  e.sender
  </code></pre>
  
  <p>Telerik state that the 'this' attribute is not obtainable during a read but I have seen no other solution other than the selector method. Basically I am trying to do this:</p>
  
  <pre><code>function filterAssigned() {
          var ctl = **this.id**;
          return {
              staffFilter: (ctl.filterInput.val() || 'empty'),
              selectedId: (ctl.value() || 0)
          };
      }
  </code></pre>