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

Setting radgrid page size and number of pages programmatically

1 Answer 531 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 10 Aug 2011, 04:21 PM

Afternoon folks.

I am using a radgrid as this has lots of functionality that I wish to keep (exporting, line selection, scrolling, etc) but I have come across a request I'm not sure how to handle and as such, I'd like some advice!

I have a radgrid attached to an object datasource implementing a SelectMethod of GetProductList and a SelectCountMethod of CountProductItems.This would return something along the lines of:

enter image description here

With CountProductItems returning 9.

What I need to do with this is dynamically set the radgrid so that the paging is defined by the guid i.e. one page for each guid present.

So in the above example, we'd have 3 pages.

On page load you'd be shown Page 1:

enter image description here

With the pager items displaying 1, 2, 3.

Click on page 2 and you'd see:

enter image description here

and clicking on page 3:

enter image description here

Does that makes sense? Is it possible and if so, any pointers greatly appreciated.

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 16 Aug 2011, 11:02 AM
Hello Richard,

You can try implementing the pager in a similar manner as it is done in this demo.
Give it a try and let me know how it goes.

Greetings,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or