Sunday, November 30, 2008

Paging in DataGrid

Go to Property Builder - > Paging - > Check Allow Paging and set properties according to your choice.

protected void DataGrid_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
{
DataGrid.CurrentPageIndex = e.NewPageIndex;
//Rebind your grid here
DataGrid.DataSource=DataSource;
DataGrid.DataBind();
}

No comments: