89004

Kendo Mobile - Can not refresh listview on ModalView Close

I can not refresh the listview when a dialog which add's or deletes rows from this listview is closes.

I tried several things. but the following does not work

function closeModalViewRemove() { $("#modalview-app-remove").kendoMobileModalView("close"); //--- this is not working -- start --- refreshAppList(); //--- this is not working -- finish --- }; function refreshAppList() { var applist = $('#applist').data('kendoMobileListView'); applist.dataSource.read(); applist.refresh(); }

what am I doing wrong?

Answer1:

The following code should do the trick.

$("#applist").data("kendoMobileListView").refresh()

Check documentation on refresh for further information: http://docs.telerik.com/kendo-ui/api/mobile/listview

Iam not sure why you have used datasource.read(). This function can be used only if you have dynamic data items that are loaded into a template inside the listview and you are deleting items in the source itself and reading rest of the source items after each time you close modal view.Inorder to delete row of a listview and display rest of the rows,just calling refresh function with id of the listview is enough.

Recommend

  • Using XOR to implement doubly linked list with one pointer per node
  • Format number with locale specific settings
  • Not able Scan using redis template
  • grep: matching on literal “+”
  • How to dynamically reshape matrix block-wise? [duplicate]
  • angularJS library for drawing bar charts with logarithmic scale
  • Laravel 5.3 blade decoding HTML Special Characters
  • How can I associate a custom URL protocol with a ClickOnce app?
  • C++ boost::spirit parsing embedded languages
  • How to trick Node.js to load .js files as ES6 modules?
  • How to model a mixture of finite components from different parametric families with JAGS?
  • how to sort an arraylist that contains string arrays?
  • Is it possible to specialize on a static lifetime?
  • How to wait for all async tasks to finish in Node.js?
  • Quick Question About Get and Set
  • Splash Screen will not display
  • redirect_to root_url and return unless @user.activated
  • Clear activity stack before launching another activity
  • Q promise. Difference between .when and .then
  • RestKit - RKRequestDelegate does not exist
  • Matrix multiplication with MKL
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • How to delete a row from a dynamic generate table using jquery?
  • WPF Applying a trigger on binding failure
  • python regex in pyparsing
  • using HTMLImports.whenReady not working in chrome
  • Hits per day in Google Big Query
  • Android Google Maps API OnLocationChanged only called once
  • File not found error Google Drive API
  • Authorize attributes not working in MVC 4
  • How can I remove ASP.NET Designer.cs files?
  • EntityFramework adding new object to nested object collection
  • Django query for large number of relationships
  • Binding checkboxes to object values in AngularJs
  • Converting MP3 duration time
  • java string with new operator and a literal
  • Net Present Value in Excel for Grouped Recurring CF
  • How can I use threading to 'tick' a timer to be accessed by other threads?
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize
  • How to load view controller without button in storyboard?