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

[Solved] How to programmally set the pager to the first page?

1 Answer 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 11 Jun 2009, 02:39 AM
Hi All,

I am using the grid to display the result of searching. One problem is that when making a new search the result will display the page that viewed last time. so I think that I need to somehow to reset the page to the 1st when I have a new search programmally. I know there is function in the .NET listview control can do so. But I can not find a way to do so for radGrid.

Please help.

TIA
Jerry
   

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jun 2009, 04:21 AM
Hello Jerry,

To reset the page to the first page on searching, you can add the following strip of code in the search button click event immediately after the code for searching.
c#:
protected void btnSearch_Click(object sender, EventArgs e) 
    { 
        // search code  
 
        RadGrid1.CurrentPageIndex = 0; 
        RadGrid1.Rebind(); 
    } 

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