Click here to Skip to main content
15,303,572 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to write a single common function for paging with first,next,previous,last buttons in datagridview control in C#.net.Any one can help me .please
Posted
Comments
nagendrathecoder 26-Aug-11 8:04am
   
Many will help you, but first you need to put something on the board.
First try yourself and let us know what have you tried.

You could have tried Google: it found me this very quickly. Paging Data with DataGridView in VirtualMode[^]
   
C#
public partial class Sample : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        PagingTableAdapter pAdapter = new PagingTableAdapter();
        DataGridView1.DataSource = pAdapter.FetchRecords(10,5);
        DataGridView1.DataBind();
    }
}
   
check this out:

DataGrid Paging - C# Windows Forms[^]

hope it helps :)
   

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