Hi -
I am trying to implement a ListView with remote call from the example using MVC helpers.
I am using MVC5 and Kendo Q3.
I am creating a ListView that calls a controller method to retrieve data. However, nothing is
display and putting a debug break point is never executed on the controller.
Any ideas?
My helper HTML is straight from the example codes and looks like this:
@(Html.Kendo().ListView<StatusItemInfo>()
.Name("statuslistview")
.TagName("div")
.ClientTemplateId("template")
.DataSource(dataSource =>
dataSource.Read(read => read.Action("Products_Read", "Home"))
)
)
My controller:
public ActionResult Products_Read([DataSourceRequest]DataSourceRequest request)
{
List<StatusItemInfo> myList = new List<StatusItemInfo>();
var info = new StatusItemInfo();
info.Location = "Sams Plaza";
info.EcoSystem = "POS";
info.Category = "File";
info.Age = "7 hours";
info.Division = "Div 2";
myList.Add(info);
DataSourceResult results = myList.ToDataSourceResult(request);
return Json(results, JsonRequestBehavior.AllowGet);
}
My template:
<script type="text/x-kendo-template" id="template">
<div class="col-md-3 col-xs-3">
<div class="issue-card white-bg border-wrap ">
<div class="card-title border-bottom">
<h4 class="error"><span class="companyFieldNumberIssues">#:Location #</span></h4>
</div>
<div class="stacked-stats">
<h3 class="no-margin">#:Category #</h3><span>#:Age #</span>
<h3 class="no-margin">#:EcoSystem #</h3><span>#:Division #</span>
</div>
</div>
</div>
</script>
I don't see any javascript console errors.
In the Network tab of Chrome developer tools, I do not see any calls to my controller.
What am I doing wrong?
Thanks,
bruce
I am trying to implement a ListView with remote call from the example using MVC helpers.
I am using MVC5 and Kendo Q3.
I am creating a ListView that calls a controller method to retrieve data. However, nothing is
display and putting a debug break point is never executed on the controller.
Any ideas?
My helper HTML is straight from the example codes and looks like this:
@(Html.Kendo().ListView<StatusItemInfo>()
.Name("statuslistview")
.TagName("div")
.ClientTemplateId("template")
.DataSource(dataSource =>
dataSource.Read(read => read.Action("Products_Read", "Home"))
)
)
My controller:
public ActionResult Products_Read([DataSourceRequest]DataSourceRequest request)
{
List<StatusItemInfo> myList = new List<StatusItemInfo>();
var info = new StatusItemInfo();
info.Location = "Sams Plaza";
info.EcoSystem = "POS";
info.Category = "File";
info.Age = "7 hours";
info.Division = "Div 2";
myList.Add(info);
DataSourceResult results = myList.ToDataSourceResult(request);
return Json(results, JsonRequestBehavior.AllowGet);
}
My template:
<script type="text/x-kendo-template" id="template">
<div class="col-md-3 col-xs-3">
<div class="issue-card white-bg border-wrap ">
<div class="card-title border-bottom">
<h4 class="error"><span class="companyFieldNumberIssues">#:Location #</span></h4>
</div>
<div class="stacked-stats">
<h3 class="no-margin">#:Category #</h3><span>#:Age #</span>
<h3 class="no-margin">#:EcoSystem #</h3><span>#:Division #</span>
</div>
</div>
</div>
</script>
I don't see any javascript console errors.
In the Network tab of Chrome developer tools, I do not see any calls to my controller.
What am I doing wrong?
Thanks,
bruce