I can't seem to figure out why my grid doesn't show data. Here's the Contoller code:
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());
}
return Json(items.ToList(), JsonRequestBehavior.AllowGet);
}
Here's the cshtml:
<div class="a">
@(Html.Kendo().Grid<CentralBilling.Models.GetOrders_Result>()
.Name("gridRater")
.DataSource(datasource => datasource
.Ajax()
.Read(read => read.Action("PopulateGrid", "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>
I'm using a stored procedure pulled in through the Model. At first I had trouble with the proc parameter so I hardcoded one and still no luck. This is driving me crazy! Thanks in advance