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

Change Displayed Page in Code

2 Answers 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
wedrown
Top achievements
Rank 1
wedrown asked on 08 May 2008, 01:29 PM
I have a RadGrid control that presents about 12 pages of data by default.  The user can custom filter the data that they wish to see through other controls on the form--a datatable is constructed and passed to the grid via NeedDataSource.

If the user moves the page selection to something other than the first page, for instance, and then filters the data such that only one page worth of data is returned, that data does not appear.  If the user ensures that the grid page displayed is the first page, then the rows returned after performing the custom filter operation are displayed in the grid.

Question: How do I tell a RadGrid to display--or change back to--the first page via the code behind?

Thank You,

David Nowak.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 May 2008, 06:59 AM
Hi,

Try the following line of code.

CS:
 RadGrid1.CurrentPageIndex =0


Thanks
Princy.
0
wedrown
Top achievements
Rank 1
answered on 09 May 2008, 04:31 PM
This worked perfectly.

Thank you so much,

David.
Tags
Grid
Asked by
wedrown
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
wedrown
Top achievements
Rank 1
Share this question
or