Hi.
I have been testing MVC Kendo.
Testing Grid has an unexpected behavior (see attached image grid_twice.png).
That render is result of the following code:
view:
and actions:
Can you figure what is happening?
Thanks
I have been testing MVC Kendo.
Testing Grid has an unexpected behavior (see attached image grid_twice.png).
That render is result of the following code:
view:
@model IEnumerable<_2TrackControl.MVC4.Models._2TrackControl.KitViewModel>@using Kendo.Mvc.UI@{ ViewBag.Title = "Index";}<h2> Index</h2><p> @Html.ActionLink("Create New", "Create")</p>@(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.ClientSetName).Groupable(false); columns.Bound(p => p.IMEI); columns.Bound(p => p.Active); columns.Bound(p => p.Inserted); }) .Groupable() .Pageable() .Sortable() .Scrollable() .Filterable() .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("_Index", "Kit")) ))private Entities db = new Entities(); //// GET: /Kit/ public ActionResult Index(){ var kitset = db.KitSet.Include("ClientSet"); Mapper.CreateMap<KitSet, KitViewModel>(); var resultReturn = Mapper.Map<List<KitSet>, List<KitViewModel>>(kitset.ToList()); return View(resultReturn);} public ActionResult _Index([DataSourceRequest] DataSourceRequest request){ var kitset = db.KitSet.Include("ClientSet"); Mapper.CreateMap<KitSet, KitViewModel>(); var resultReturn = Mapper.Map<List<KitSet>, List<KitViewModel>>(kitset.ToList()); return Json(resultReturn.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);}Can you figure what is happening?
Thanks