More in this section

Forums / General Discussions / How would you get multiple items using REST

How would you get multiple items using REST

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    27 Oct 2010
    Link to this post
    I want my control to pull its data from a WCF REST service.

    So in the Designer lets say the user chooses to show Items 3, 6, 10, 12

    How do you go about handing something like that with a REST approach, or does that fly in the face of the idea :)

    Ideally I'd want an XML result with those 4 items which I can just databind (needs to be consumed by flash as well as some telerik bits)
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    27 Oct 2010
    Link to this post
    Hi Steve,

    You can pass the number of the items you want to take as an agreement of your WCF service. Then in the code of the method you can cast your collections results to Queriable and use the Take method to take N items: Queryable.Take Method

    Best wishes,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered