Stored Proc Paging

8 posts, 0 answers
  1. Doyle
    Doyle avatar
    5 posts
    Member since:
    Aug 2010

    Posted 10 Sep 2010 Link to this post

    Does this control support stored procedure paging ? IF so point me to some sample code please.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 13 Sep 2010 Link to this post

    Hi,

     To achieve your goal you should implement custom IPagedCollectionView where you can call your service methods and in the service methods you can call your stored procedures. You can check this blog post for more info about paging with IPagedCollectionView.

    Kind regards,
    Vlad
    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
  3. DevCraft banner
  4. Doyle
    Doyle avatar
    5 posts
    Member since:
    Aug 2010

    Posted 13 Sep 2010 Link to this post

    I need an end- to-end sample doing stored proc paging... I have a big app and lots of data involved and must have this before going down the SL/Telerik road. I like the way your stuff looks but wondering if it can really handle the load I intend to give it. I'm a potential buyer and will be monitoring your site for any developments in this area. Thanks Doyle
  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 14 Sep 2010 Link to this post

    Hi Doyle,

    We do not have and end-to-end sample right now. By the way, did you know that you can use RadDataPager in unbound mode. This means that it will not have any Source assigned and you will not have to implement the IPagedCollectionView interface.

    Think of the Unbound Mode as of using the pager solely for the UI it provides. Using Unbound Mode is pretty straightforward. You have to do only two things.

    1. Set the ItemCount of the pager to the total item count that you have in the DB. Along with the PageSize this will help the control calculate the number of pages and update its UI.

    2. Attach to the PageIndex changed event of the control. It will be fired when the user goes to a certain page. The page index you can read from the event arguments.

    Having the page index you can do anything in the world, which in your case will be to call your stored procedure with the page index as a parameter.

    I hope this helps.

    All the best,
    Ross
    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
  6. Doyle
    Doyle avatar
    5 posts
    Member since:
    Aug 2010

    Posted 14 Sep 2010 Link to this post

    Thank you. That would meet my needs just fine. I am assuming unbound mode is a simple property setting....
  7. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 14 Sep 2010 Link to this post

    Hello Doyle,

    Yes it is. If you set the Source property => you are bound. If you set the ItemCount property => you are Unbound. If you try to set the ItemCount property while you have a real Source, you will get an exception.

    So it is either using the Source property (Bound) or manually adjust the ItemCount (Unbound).

    You can download a trial version and play around with it. It is absolutely free. Here are some online examples that might get you started. We are currently working on an Unbound Example, but it is trivial, just as I have explained in my previous post.

    I hope this helps. Let me know if I can help with anything else.

    Best wishes,
    Ross
    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
  8. Doyle
    Doyle avatar
    5 posts
    Member since:
    Aug 2010

    Posted 16 Sep 2010 Link to this post

    I will do that I am assuming it is time limited so I want to have my trials prepared. I am into Lermans Entity Framework right now and have not yet seen how I am going to process both a stored procedure result set and an ouput parm to hold the "total pages" within a single Entity Framework call. I certainly do not want to run a sp just to count what I am returning based on user search criteria.
  9. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 17 Sep 2010 Link to this post

    Hello Doyle,

    Maybe you should create a single service method that will return both the data and the total number of items in some kind of structure. I am not really sure. This really is a matter of your data layer design, whereas RadDataPager is on the client-side.

    Sincerely yours,
    Ross
    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
Back to Top
DevCraft banner