Hi,
I'm trying to use a MobileListView in my project with this code:
<div class="row"> <div class="col-xs-12"> @(Html.Kendo().MobileView() .Title("Chiamate") .Header(obj => Html.Kendo().MobileNavBar() .Name("ChiamateNavbar") .Content(navbar => @<text> @navbar.ViewTitle("Chiamate") </text>) ) .Content( @<text> @(Html.Kendo().MobileListView<Telesan.CloudLift.WebApplication.Models.Chiamate.ChiamataListViewModel>() .Name("ChiamateListView") .TemplateId("ChiamateTemplate") .PullToRefresh(true) .EndlessScroll(true) .DataSource(dataSource => dataSource .Read(r => r.Action("ChiamateAjaxList", "Chiamate").Data("onData").Type(HttpVerbs.Post)) .ServerOperation(true) .Filter(t => { t.Add(m => m.DataOra).IsGreaterThanOrEqualTo(DateTime.Today.AddDays(-3)); t.Add(m => m.IDStato).IsNotEqualTo((Guid)ViewBag.StatoChiuso).And().IsNotEqualTo((Guid)ViewBag.StatoElaborato); }) .Sort(s => s.Add(m => m.DataOra).Descending()) .PageSize(50) ) ) </text>) ) </div></div>But it doesn't render to my page so after a search I've found a possible solution by adding this in _L:
@(Html.Kendo().MobileApplication() .ServerNavigation(true) )
Your kendo mobile application element does not contain any direct child elements with data-role="view" attribute set. Make sure that you instantiate the mobile application using the correct container.This is the _Layout block where @RenderBody is:
<div class="cloudlift-container"> <div class="row"> <div class="col-xs-12 main-content"> @RenderBody() </div> </div> </div> @(Html.Kendo().MobileApplication() .ServerNavigation(true) )Can somebody help?