This is a migrated thread and some comments may be shown as answers.

ListViewCustomTemplate not working

1 Answer 86 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Luke Jeffrey
Top achievements
Rank 1
Luke Jeffrey asked on 25 Jan 2012, 05:19 PM
Guys,

I have setup a demo using Kendo datasource. See attached for the html and JSON responses.

I have two questions:

1. When firing the GetCustomersData() method the items do not appear in the list after being appended unless I hit the backspace button - why is this?

2. I have lifted parts of your custom template binding example to try to get this working but cannot seem to, please let me knmow what is not quite right.

I have attached the HTML and the .json response from the WCF Data Service.

Note: the repsonse is normally sent to Kendo UI as JsonP as the "oData" type on the transport requires this.

Luke

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 26 Jan 2012, 09:48 AM
Hi,

Your oData response seems to be version 1, and our DataSource supports version 2.0.

In addition to that, there are several recommendations for your example: 

  • Instead of using onclick, you should bind to the mobileButton click event. 
  • If you don't want the button to navigate, do not put a href attribute on the element. Right now clicking the button navigates to the same view as a remote one (probably that is the reason for the back button). 
  • You can also use the view-init data attribute of the view to execute the code in the right moment. 

Our mobile Button events example illustrates both techniques (view the source).
 
Greetings,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
Luke Jeffrey
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or