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.
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"), model, 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") { $.ajax({ type: 'PUT', url: '/api/Message/' + ID + "/?decision=1", success: function () { dataSource.remove(model); }, failure: function (errMsg) { alert("Something happened. Triage not recorded"); }, dataType: "json" }); }}}