I have put together a simple app which include a few or the "out-of-the-box" index views. I would like to swap the table in these views for the Telerik grid.
I have the following action in the controller:
I have swapped out the table code and copied the following from the demo
When I try to view the
System.InvalidOperationException was unhandled by user code
HResult=-2146233079
Message=A circular reference was detected while serializing an object of type 'System.Data.Entity.DynamicProxies.Asset_ED2530D1AC046011EB9F014D634FE570012E36DD19818476965A4BF61659B91A'.
Source=System.Web.Extensions
I changed the HTML helper line to
which then rendered the grid on the page without the exception however there was no data.
Can you please tell me what I am doing wrong.
I have the following action in the controller:
// GET: Assetspublic ActionResult Index(){ var assets = db.Assets.Include(a => a.Equipment).Include(a => a.Owner).Include(a => a.ServiceCompany).Include(a => a.Site); return View(assets.ToList());}I have swapped out the table code and copied the following from the demo
@(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.Site).Title("Site").Width(130); columns.Bound(p => p.Location).Title("Location").Width(130); columns.Bound(p => p.Description).Title("Decriptopn").Width(130); columns.Bound(p => p.InstallDate).Title("Install Date").Width(130); columns.Bound(p => p.SerialNo).Title("Serial Number").Width(130); }) .Pageable() .Sortable() .Scrollable(scr => scr.Height(430)) .Filterable() .DataSource(dataSource => dataSource .Ajax() .PageSize(20) .ServerOperation(false) ))When I try to view the
System.InvalidOperationException was unhandled by user code
HResult=-2146233079
Message=A circular reference was detected while serializing an object of type 'System.Data.Entity.DynamicProxies.Asset_ED2530D1AC046011EB9F014D634FE570012E36DD19818476965A4BF61659B91A'.
Source=System.Web.Extensions
I changed the HTML helper line to
@(Html.Kendo().Grid<AMScan.Models.Asset>()which then rendered the grid on the page without the exception however there was no data.
Can you please tell me what I am doing wrong.