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

Pagination in gridview

1 Answer 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vaithi
Top achievements
Rank 1
Vaithi asked on 23 Jan 2009, 10:23 AM
Hi,

I am trying to implement pagination in griedview and somehow got success by using the following code

var page = GridViewItemsControl.GetVirtualizingPanel(GridView1.ItemsControl);
            page.PageDown();

But I want movenext, moveprevious, move first and move last functionalities. Moreover I wanted to display the current page number also.

Please help me to achive this solution.

Thanks!

Vaithi.



1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 26 Jan 2009, 03:11 PM
Hello Vaithi,

For moveNext/Prev functionality use the LineUp(), LineDown() methods.
For moveToFirst functionality use SetVerticalOffset(0);
For moveToLast functionality use SetVerticalOffset(page.ExtentHeight);

To see the page where you are use the ExtentHeight and VerticalOffset properties.

Please let us know if you need more help on that.

Kind regards,
Victor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Vaithi
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or