5 Answers, 1 is accepted
The issue is with the Kendo UI Data Source configuration, therefore, I moved your post in this forum thread.
Thank you for providing the Dojo snippet, I modified it with the following changes and it is now working as expected:
- dataType of the transport read operation is now JSON
The service returns JSON, so the correct dataType is JSON.
- added missing schema data
Looking at the response format - you should be able to configure the Kendo UI Data Source with the schema data property unless you need to make any changes, the call to schema parse is unnecessary. E.g. instead of looping over the response.data, both instances could have a similar configuration:
- the Kendo UI Data Source data should be an array, not a string (myDataSource1 - "status"):
- the Kendo UI Mobile ListView requires a mobile application and a view so they can run and trigger a read request:
I have updated the example and you can press "Run" in the below Dojo snippet or go to its FullScreen mode:
Telerik by Progress
Thanks a lot Alex for the detailed explanation and references.
Really appreciate it.
Is there any way that I can limit the number of items that are displayed in the listview ?
I will read the data from the webservice , but from the result I need to display say only the first two or last two ?
I was to able to limit the data by using the query option
But I still I have one more final thing left.
Basically I am using the Barcode plugin to scan a barcode , and the scanned data is added to the Telerik back-end content type , and the content type's data is displayed in a list view.
Scanning and adding to the back-end content type is fine , but the list does not get automatically refreshed with the newly added data.
I have also used the sort option in the query such that the latest added option is at the first page.
Also used datasource read and sync methods after adding the data
Despite this I have to refresh or reload the app to see the newly added item in the list.
Any pointers how can I fix this ?
The approach that you have taken with calling the read() method of the Kendo UI Data Source when there have been changes in the backend is correct. If the changes were added through the UI, then you would need to call the add() method and then sync() to sync the changes with the server.
If I understand you correctly, you are inquiring about how to refresh the Kendo UI Hybrid ListView when there are changes on the server. I have created a sample demo with a similar scenario, please feel free to modify it and return the newly generated URL from the address bar:
Alternatively, you may provide a snippet which shows how and when the read() method is called.
Look forward to hearing back from you.
Telerik by Progress