title: How to bind json dynamic model in asp.net mvc 3?
body: <p>
  Hi; every kind of solution binding data webgrid static models. But my Data is dynamic. Please dont say: why do you use DataTable?
  </p>
  <p><b>Controller: </b></p>
  <pre><code>
  
        [AcceptVerbs(HttpVerbs.Post)]
          public ActionResult Index(string submitButton, FormCollection fc)
          {
              ViewData["Customers"] = new SelectList(CustomerOperation.GetCustomers().Items, "Id", "Name", null);
              ViewData["Jobs"] = new SelectList(JobOperation.GetCustomersAssemblyList().Items, "scheduleId", "name", null);
              int Id = ConvertUtil.ToInt(fc["Customers"]);
              int scheduleId = ConvertUtil.ToInt(fc["Jobs"]);
              DataTable dt = JobOperation.GetJobsBySchedulerIdAndCustomerId(scheduleId, Id);
             return View(Json(dt,JsonRequestBehavior.AllowGet));
          }
  </code></pre>
  <p><b>View:</b></p>
  <pre><code>
   &#60;% 
       List&#60;WebGridColumn&#62; cols = new List&#60;WebGridColumn&#62;();
       WebGrid grid = null;
       if (Model != null)
       {
             grid = new WebGrid(source: Model.Data, rowsPerPage: 3);
           
           System.Reflection.PropertyInfo[] propertiesofColumn = new System.Reflection.PropertyInfo[] { };
           foreach (object column in Model)
           {
               propertiesofColumn = column.GetType().GetProperties();
           }
  
           foreach (System.Reflection.PropertyInfo propInfo in propertiesofColumn)
           {
               cols.Add(grid.Column(propInfo.Name, propInfo.Name));
           }
  
         
       }
       
     using (Html.BeginForm())
        { %&#62;
  </code></pre>
  <p>Error is occured on <b>   grid = new WebGrid(source: Model.Data, rowsPerPage: 3);</b>.</p>
  <p>ERROR:</p>
  <p>RunTimeBinderException:  The best overloaded method match for 'System.Web.Helpers.WebGrid.WebGrid(System.Collections.Generic.IEnumerable, System.Collections.Generic.IEnumerable, string, int, bool, bool, string, string, string, string, string, string, string)' has some invalid arguments</p>