This is a migrated thread and some comments may be shown as answers.

ListView datasource read not called

1 Answer 98 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
bruce asked on 03 Jan 2014, 09:49 PM
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:

                        .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";

            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 class="stacked-stats">
                <h3 class="no-margin">#:Category #</h3><span>#:Age #</span>
                <h3 class="no-margin">#:EcoSystem #</h3><span>#:Division #</span>

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?


1 Answer, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 06 Jan 2014, 01:26 PM
Problem solved.

I didn't have my route setup properly.

Case closed.
Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Share this question