Binding Listview to a SQL Database and Interpreting the Data

2 posts, 1 answers
  1. Answer
    Michael
    Michael avatar
    3 posts
    Member since:
    Mar 2013

    Posted 23 Apr 2013 Link to this post

    I am attempting to convert my JSON data to a Kendo UI Mobile Listview. my php script outputs this data:

    [{"eventID":"1","name":"test","time":"12:00:00","category":"####","subcategory":"####","description":"Event for testing purposes","locationID":"1","picturePath":"http:\/\/####\/~z3370257\/images\/1.jpg"},{"eventID":"2","name":"test2","time":"13:00:00","category":"####","subcategory":"SEIT","description":"Event for testing purposes2","locationID":"1","picturePath":"http:\/\/####\/~z3370257\/images\/1.jpg"}]


    This JS Fiddle uses the same html css and javascript file that my app does. 

    My question is, what do I need to put in my transport & read methods to get it to interpret the data correctly. 
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 25 Apr 2013 Link to this post

    Hi Michael,

     You basically need to set the url setting of transport.read to your PHP file. It is quite similar to your jsfiddle setup:

    var eventData = new kendo.data.DataSource({
        transport: {
            read: {
                url: "/your-page.php",
                dataType: "json",
                type: "POST"
            }
        }
    });

    Regards,
    Atanas Korchev
    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