Bug When rebuilding a ListView with headers.

2 posts, 0 answers
  1. Yohann
    Yohann avatar
    54 posts
    Member since:
    Jan 2014

    Posted 16 Apr 2014 Link to this post


    I am trying to re build a list view and I'm facing a situation I cannot solve:

    I first build a list view with headers:

    var template = Handlebars.compile( $( '#eventListTemplate' ).html() );
     // detach events
     var listView = $("#list-container").data("kendoMobileListView");
     if ( typeof listView !== typeof undefined ) { listView.destroy(); };
         template : template,
         dataSource: kendo.data.DataSource.create( { data:results, group:"start" } ),
         fixedHeaders: true

    Then when a user click on some button, it should repopulate the list view without headers this time (the data structure is completely different as well as the template):

        var template = Handlebars.compile( $( '#userListTemplate' ).html() );
            template : template,
            dataSource: kendo.data.DataSource.create( results ),
            fixedHeaders: false

    Unfortunately, the list view is repopulated with the headers and the whole thing crash as nothing is displayed (I've checked in the code source, it is appended though, but nothing is displayed) its just like if when calling the destroy method the widget wasn't completely destroyed. Why is this happening ?

    Thank you very much for your help as for now I have to drop out the headers

  2. Kiril Nikolov
    Kiril Nikolov avatar
    2596 posts

    Posted 17 Apr 2014 Link to this post

    Hi Yohann,

    I have tried to reproduce this issue in the following jsBin, but to no avail. Could you please take a look and let me know what I missed?


    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