Quantcast
Channel: CodeProject Latest postings for ASP.NET
Viewing all articles
Browse latest Browse all 3938

Kendo Grid Issues

$
0
0
For the life of me I can't understand why my grid won't populate. I'm sending my data from the controller to the view but the grid is always blank.

public JsonResult PopulateGrid()
       {
           var x = (from n in dbContext1.GetOrders("Melody Devoe") select n);
           List<string> items = new List<string>();
 
           foreach (var item in x)
           {
               items.Add(item.ToString());
           }
 
           //List<CentralBilling.Models.GetOrders_Result> returnList = new List<CentralBilling.Models.GetOrders_Result>();
return Json(items.ToList(), JsonRequestBehavior.AllowGet);
           //return Json(items.ToDataSourceResult(request));
       }
Here's the cshtml
<pre lang="HTML"><div class="a">
@(Html.Kendo().Grid<CentralBilling.Models.GetOrders_Result>()
.Name("gridRater")
.DataSource(datasource => datasource
.Ajax()
.Read(read => read.Action("Customers_Read", "Home")))
.Columns(columns =>
{
columns.Bound(o => o.Order_Number);
columns.Bound(o => o.ActDate);
//columns.Bound(o => o.Agent_Role);
//columns.Bound(o => o.aom_shipment_type);
//columns.Bound(o => o.Delay);
//columns.Bound(o => o.DeadlineDist);
//columns.Bound(o => o.DistStatus);
//columns.Bound(o => o.SubmitDate);
//columns.Bound(o => o.LastAct);
//columns.Bound(o => o.LastComment);
})
.Sortable()
.Scrollable()
.Filterable()
.Selectable()
)
</div>

Viewing all articles
Browse latest Browse all 3938

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>