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

Binding Listview to a SQL Database and Interpreting the Data

1 Answer 131 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 24 Apr 2013, 04:43 AM
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. 

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 25 Apr 2013, 11:03 AM
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!
Tags
ListView (Mobile)
Asked by
Michael
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or