ListView does not render template on query

2 posts, 0 answers
  1. Eli
    Eli avatar
    2 posts
    Member since:
    Dec 2014

    Posted 07 Sep 2016 Link to this post

    I am using the HTML wrapper for the ListView in MVC.  I give the ListView a datasource to an Odata service.  I am using a template to display the items in the ListView.  When the page first loads and service returns the data the templates are rendered on the bind.   However, when I attempt to query the data source the template is not rendered.  The call to my OData service succeeds and data is returned as confirmed in the Developer Tools, and loading spinner is displayed over the control while the query is executing.

    The idea here is that I will call the query on a button click so that I can apply filters.  




    <script type="text/x-kendo-tmpl" id="resultsViewTemplate">
        <div class="col-md-6">
            <div class="thumbnail">
                <div class="result-item location">
                    <p>#:City#, #:State# #:ZipCode#</p>
                <div class="result-item restrictions">
                <div class="result-item amenities">



    $("#update").on("click", function(e) {


    Configuration of the ListView:

        .DataSource( ds => ds
            .Transport( tp => tp
                .Read( read => read



  2. Dimiter Topalov
    Dimiter Topalov avatar
    1298 posts

    Posted 10 Sep 2016 Link to this post

    Hi Eli,

    Please check out the DataSource API reference for explanation and sample usage of the query() method:

    All relevant dataSource configuration options like page, pageSize, sort, filter, etc., should be provided in as query() arguments, or the initial configuration will be lost.

    You can also check out the following resources on server data-operations (grouping, aggregates, filtering, sorting, paging), and make sure that the remote data service is properly configured. Also note that mixing data operations modes is not supported, and will have undesired side effects.

    I have prepared a simple example (with client-side operations) that illustrates the query() method properly filtering the ListView:

    On a side note, if you just want to filter the dataSource, you can use the filter() method that does not have all side effects of the query() method:

    The following how-to article from our documentation might also prove useful:

    I hope this helps, but if the issue persists, please send us a similar isolated runnable project (you can also use the Kendo UI Dojo) where it can be observed, so we can inspect what might be causing it, and provide a more to-the-point suggestion.

    Dimiter Topalov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top