title: Kendo UI Grid pass id from text input to Read command
body: <p>What would be the best way to pass the id to the controller using the <code>Read</code> command of a Kendo UI Grid? The id has to be obtained from a textbox and the trigger to load data in the grid has to be from a button click. I prefer using javascript and jQuery to achieve this. This is the code I've got so far:</p>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>    public ActionResult StrategyParameter_Read([DataSourceRequest]DataSourceRequest request, int? id)
      {
          IQueryable&lt;StrategyParameter&gt; strategyParam = 
                                 _db.StrategyParameter.Where(p =&gt; p.StrategySetId == id);
          DataSourceResult result = strategyParam.ToDataSourceResult(request, sp =&gt; new {
              Id = sp.Id,
              StrategySetId = sp.StrategySetId,
              ParamType = sp.ParamType,
              Key = sp.Key,
              Value = sp.Value,
              MinimumValue = 0,
              MaximumValue = 0,
              IncrementalValue = 0
          });
  
          return Json(result);
      }
  </code></pre>
  
  <p><strong>View:</strong></p>
  
  <pre><code>&lt;div class="form-group strategy-set-id"&gt;
      &lt;label class="col-sm-2 control-label" for="strategySetId"&gt;Strategy Set ID&lt;/label&gt;
      &lt;div class="col-sm-4"&gt;
          &lt;input type="number" min="0" step="1" id="strategySetId" class="form-control" placeholder="Enter a Strategy Set ID"&gt;
          &lt;span class="help-block"&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-offset-2 col-sm-1"&gt;
          &lt;button type="submit" class="btn btn-primary" id="get-params"&gt;Get Parameters&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  @(Html.Kendo().Grid&lt;StrategyParameterViewModel&gt;()
      .Name("strategyParameters")
      .Columns(columns =&gt;
      {
        columns.Bound(c =&gt; c.Id).Width(170);
        columns.ForeignKey(p =&gt; p.ParamType, (System.Collections.IEnumerable)ViewData["paramTypes"], "Key", "Value").Title("Param Type").Width(200);
        columns.Bound(c =&gt; c.Key);
        columns.Bound(c =&gt; c.Value);
        columns.Bound(c =&gt; c.MinimumValue);
        columns.Bound(c =&gt; c.MaximumValue);
        columns.Bound(c =&gt; c.IncrementalValue);
      })
      //.ColumnMenu()
      .Editable(editable =&gt; editable.Mode(GridEditMode.InLine))
      .Pageable(pager =&gt;
          pager.Refresh(true)
      )
      .Navigatable()
      .Resizable(resize =&gt; resize.Columns(true))
      .Sortable(sortable =&gt;
      {
        sortable.SortMode(GridSortMode.SingleColumn);
        sortable.AllowUnsort(false);
      })
      .Filterable(filterable =&gt; filterable.Mode(GridFilterMode.Menu))
      .Scrollable()
      .DataSource(dataSource =&gt; dataSource
          .Ajax()
          .PageSize(100)
          .Model(model =&gt;
          {
            model.Id(p =&gt; p.Id);
            model.Field(p =&gt; p.Id).Editable(false);
          })
          .Read(read =&gt; read.Action("StrategyParameter_Read", "StrategySets"))
          .Sort(sort =&gt; sort.Add("Id").Descending())
      )
      .Deferred()
  )
  </code></pre>