ListViewCustomTemplate not working

2 posts, 0 answers
  1. Luke Jeffrey
    Luke Jeffrey avatar
    2 posts
    Member since:
    Jun 2008

    Posted 25 Jan 2012 Link to this post

    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
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 26 Jan 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top