Click here to Skip to main content
16,013,338 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using data gridview control and also using the page index ,The first page is stored in Database but second page value is not stored.
Posted
Comments
Jim Jos 22-May-12 4:44am    
Are you using foreach statement to read the contents of gridview? If you have paging enabled you need to set the page index also in a loop above the foreach loop

1 solution

set your OnPageIndexChangingevent

C#
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GridView1.PageIndex = e.NewPageIndex;
            YourGridViewFillMethod();
        }.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900