endlessScroll dataSource.remove(model) problem

2 posts, 0 answers
  1. Karl
    Karl avatar
    6 posts
    Member since:
    Jun 2011

    Posted 22 Apr 2013 Link to this post

    Hi All,

    I currently have a mobile listview that has endless scrolling (server paging).  By endlessScroll design, when another page is requested from scrolling, the previous page data is not available in the dataSource.   Therefore when I want to remove the item from the listview, I would typically use "dataSource.remove(model)"  The code snippet below shows where I have the dataSource.remove(model).   But if I try and remove an item from a previous page, it is not in the dataSource.   Would anyone know how I would remove the item from the listview not in the current dataSource list?   Would I need to remove it from the DOM level?   Any help would be greatly appreciated!  

    Thanks in advance. 
    function touchstart_inbox(e) {
                var target = $(e.touch.initialTouch),
                    listview = $("#group-inbox").data("kendoMobileListView"),
                    button = $(e.touch.target).find("[data-role=button]:visible");
                if (target.closest("[data-role=button]")[0]) {
                    var ID = $(e.touch.currentTarget).find(".msgID").attr("data-id");
                    if (target.closest("[data-role=button]")[0].id == "InboxDeleteButton") {
                            type: 'PUT',
                            url: '/api/Message/' + ID + "/?decision=1",
                            success: function () {                          
                            failure: function (errMsg) {
                                alert("Something happened.  Triage not recorded");
                            dataType: "json"

  2. Alexander Valchev
    Alexander Valchev avatar
    2873 posts

    Posted 24 Apr 2013 Link to this post

    Hi Brian,

    Thank you for getting in touch with us.
    To remove an item that does not persists anymore in the DataSource, please delete its DOM element. In case you want to synchronize the change with the server, you can submit the record's ID through a separate Ajax request.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top