ListView data isn't displaying

2 posts, 0 answers
  1. Brian
    Brian avatar
    3 posts
    Member since:
    Feb 2015

    Posted 02 Oct 2015 Link to this post


     I'm trying to create a kendo list view in razor c#. For some reason, when my view loads, the read.action gets hit, but it never enters my controller. I cant figure out why that is. Also, when I manually bind the data source using bindto(), i get the data back but it never gets rendered in the template. What am i doing wrong?


    Here is my listview wrapper :


            .DataSource(datasource =>
                    datasource.Model(model => model.Id(p => p.Article_ID));
                    datasource.Read(read => read.Action("GetDepartmentArticles", "Departments", new { departmentID = Model.CurrentSection.Section_ID.ToString() }));


    Here is the template (this isnt a real template, just for testing) :

     <script type="text/x-kendo-template" id="template">
               <p> ${Title}</p> 
               <p> #=Title#</p>
              <p>  #:Title#</p>

     Here is the controller : 

    public ActionResultGetDepartmentArticles([DataSourceRequest]DataSourceRequest request,string departmentID)
                List<proc_GetDepartmentArticles> articleList = db.Proc_GetDepartmentArticles(Pub.Pub_ID, Convert.ToInt32(departmentID)).ToList();

                return Json(articleList.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);




  2. Kiril Nikolov
    Kiril Nikolov avatar
    2596 posts

    Posted 06 Oct 2015 Link to this post

    Hello Brian,


    Your setup looks correct, are you sure that you have a 'Title' field in your model? If this does not resolve the issue, please attach the sample here and we will be happy to investigate it!


    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top