Learn GridView - Part II (Changing PageIndex)

in this we learn how we change the page index of the grid view.

only write the coding in Default.aspx.cs

protected void PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
BindData(); // define the coding in previous post Learn GridView - Part-I
}

2 comments:

Ratikanta said...

it is working on only one button .
if more than one button is present
like a,b,c,d,...........
then how can i use page index?

Qureshi Zubair Alam said...

the buttons are auto generated and its working on all links