ListView datasource read not called

2 posts, 0 answers
  1. bruce
    bruce avatar
    10 posts
    Member since:
    Sep 2010

    Posted 03 Jan 2014 Link to this post

    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?

  2. bruce
    bruce avatar
    10 posts
    Member since:
    Sep 2010

    Posted 06 Jan 2014 Link to this post

    Problem solved.

    I didn't have my route setup properly.

    Case closed.
Back to Top