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

Stored Proc Paging

7 Answers 65 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Doyle
Top achievements
Rank 1
Doyle asked on 10 Sep 2010, 05:19 PM
Does this control support stored procedure paging ? IF so point me to some sample code please.

7 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Sep 2010, 08:36 AM
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
0
Doyle
Top achievements
Rank 1
answered on 13 Sep 2010, 11:19 PM
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
0
Rossen Hristov
Telerik team
answered on 14 Sep 2010, 08:38 AM
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
0
Doyle
Top achievements
Rank 1
answered on 14 Sep 2010, 02:06 PM
Thank you. That would meet my needs just fine. I am assuming unbound mode is a simple property setting....
0
Rossen Hristov
Telerik team
answered on 14 Sep 2010, 02:55 PM
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
0
Doyle
Top achievements
Rank 1
answered on 16 Sep 2010, 02:16 PM
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.
0
Rossen Hristov
Telerik team
answered on 17 Sep 2010, 08:51 AM
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
Tags
DataPager
Asked by
Doyle
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Doyle
Top achievements
Rank 1
Rossen Hristov
Telerik team
Share this question
or