title: displaying values in kendo grid
body: <p>I am trying to display the detials in kendo Ui grid by using the custom list not using any database in button click , but I failed to display the details in grid, for that purpose I have done like this..</p>
  
  <p>this is my model</p>
  
  <pre><code>namespace KendoPratapSampleMVCApp.Models
  {
      public class SampleGrids
      {
          public List&lt;Sample&gt; samples;
      }
      public class Sample
      {
          public string SampleDescription { get; set; }
          public string SampleCode {get; set;}
          public string SampleItems { get; set; }
      }
  }
  </code></pre>
  
  <p>and this is controller( here I am calling the <code>getsamples()</code> method inside <code>PostValues</code> event(this is button click event))</p>
  
  <pre><code>  namespace KendoPratapSampleMVCApp.Controllers
     {
       public class SearchResultsDisplayController : Controller
       {
          //
          // GET: /SearchResultsDisplay/
  
          public ActionResult Index()
          {
              return View();
          }
          public static IEnumerable&lt;Sample&gt; GetSamples()
          {
              List&lt;Sample&gt; sampleAdd = new List&lt;Sample&gt;();
              Sample s12 = new Sample();
              s12.SampleCode = "123se";
              s12.SampleDescription = "GOOD";
              s12.SampleItems = "newone";
  
              Sample s2 = new Sample();
              s2.SampleCode = "234se";
              s2.SampleDescription = "Average";
              s2.SampleItems = "oldone";
  
              sampleAdd.Add(s12);
              sampleAdd.Add(s2);            
              return sampleAdd;
          }
          [HttpPost]
          public ActionResult PostValues(Sample model)
          {
              return View("Index",GetSamples());               
          }
          public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request)
          {
              return Json(GetSamples().ToDataSourceResult(request));
          }     
      }
  }
  </code></pre>
  
  <p>and this is my view (here I am binding using jquery)</p>
  
  <pre><code> @Scripts.Render("~/bundles/jquery")     
  &lt;script type ="text/javascript"&gt;
      $('#Submit1').click(function () {
          alert('1'); // dint get this alert when I click on submit button
          $('#grid12').data('kendoGrid').dataSource.read();
         // $('#grid12').css("display", "block");
      });
  &lt;/script&gt;    
  @model IEnumerable&lt;KendoPratapSampleMVCApp.Models.Sample&gt;    
  @{
      ViewBag.Title = "Index";
  }    
  &lt;h2&gt;Index&lt;/h2&gt;
  @using (Html.BeginForm("PostValues", "SearchResultsDisplay", FormMethod.Post))
  { 
  
      &lt;input id="Submit1" type="submit" value="SubmitValue" /&gt;
      @(Html.Kendo().Grid&lt;KendoPratapSampleMVCApp.Models.Sample&gt;()    
      .Name("grid12")
      .Columns(columns =&gt; {
          columns.Bound(p =&gt; p.SampleDescription).Filterable(false).Width(100);
          columns.Bound(p =&gt; p.SampleCode).Filterable(false).Width(100);
          columns.Bound(p =&gt; p.SampleItems).Filterable(false).Width(100);
      })
      .Pageable()
      .Sortable()
      .Scrollable()
      .AutoBind(false) // here I am disabling automatic binding at page load
      .Filterable()
      .HtmlAttributes(new { style = "height:430px;" })
      .DataSource(dataSource =&gt; dataSource
          .Ajax()
          .PageSize(20)
          .Read(read =&gt; read.Action("Orders_Read", "SearchResultsDisplay"))
       )
    )
  }
  </code></pre>
  
  <p>I am not able to bind the data when we submit the button Any suggestions and any ideas would be very grateful to me ...
  many thanks....</p>