Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i need a paging on grid..that means if the grid page shows 100 of record values..if 1st page allow only 20 records,2nd page allow only 20 recors,remaing pages the same wise....

send me the code
Posted
Comments
Member 13563129 9-Dec-17 16:43pm    
How can i make a method that takes copy from sorted data grid view to use it as a data source when i handel the paging event in asp.net c#.

 
Share this answer
 
Comments
skkworld 13-Oct-11 5:45am    
i need to display only 20 records per page....
OriginalGriff 13-Oct-11 5:49am    
Yes? The link does exactly that...
 
Share this answer
 
 
Share this answer
 
As far as I understood your question you want to display 20 records per page in gridview.

sorry if misunderstood.

Set the Griidview AllowPaging="true" and pagesize="20"

In page index changing event write the following code

C#
protected void Gridview1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
           
            gvEMaterials.PageIndex = e.NewPageIndex;
            FillGrid();//Method to bind gridview
    }
 
Share this answer
 
v2

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