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

Problem to implement pull to refresh feature with custom json data.

1 Answer 50 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Ammas
Top achievements
Rank 1
Ammas asked on 20 Jul 2012, 07:10 PM
Hi, 
I'm facing some problem to implement pull to refresh feature. Actually I have to show some RSS feeds which I'm getting using yahoo.pipe and I'm returning json object, which schema you can view in attached image.

Problem is this I need to bind items with list view and every time request to this remote pipe it will return me a single object and that particular object internally contains items array and I have to bind this item array to list view and implement pull to refresh. I'm not sure how could I do this. 

I read documentation and try to define the schema of my return json object but still, I'm not able to show data. If I go through the firebug or developer tools its requesting the provided URL but just because of single object in return on every call, I'm not able to bind it with list view and implement pull to refresh feature. Its my limitation that I must have to return single object and that will contain items array which will bind with list view with pull to refresh feature.

Please help me, I'm stuck on it.

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 25 Jul 2012, 04:19 PM
Hi Ammas,

If I understood your scenario correctly, you should specify how to get the result (the root object) that contains the data array. As an example:
dataSource: {
    schema: {
        data: function(data) {
            return data.items; //specify the root object
        }
    }
}

I hope this helps. Please let me know if I missed something.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Ammas
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or