I try get data from DataBase.
View:
Controller:
data is not empty and successful return 12 items, but grid is empty :(((
Sample with createRandomData(50) from people.js is OK.
View:
<script type="text/javascript" language="javascript"> $(document).ready(function () { $("#grid").kendoGrid( { groupable: true, scrollable: true, sortable: true, pageable: true, filterable: true, dataSource: { type: "json", transport: { read: { url: "/Item/GetItems", type: "POST", dataType: "json", contentType: "application/json; charset=utf-8" } } }, columns: [ { field: "ID", title: "ID" }, { field: "InvNo", title: "Инв.номер" } ] }); }); </script>Controller:
public JsonResult GetItems() { List<SelectListItem> searchParams = new List<SelectListItem>(); searchParams.Add(new SelectListItem() { Value = "InvNo", Text = "121" }); IList<Item> data = _itemService.GetItems(searchParams); return Json(data.ToList(), JsonRequestBehavior.AllowGet); }data is not empty and successful return 12 items, but grid is empty :(((
Sample with createRandomData(50) from people.js is OK.