I've used asp.net gridview control. In gridview doing paging manually. But only first page shows the records. the page is completely blank. can anyone suggest what & where will I need to modify for the PageIndex Events?
Asked
Active
Viewed 1,692 times
0
-
2Abracadabra! Hum... no. This did not make the code appear – Steve B Jan 16 '13 at 10:49
2 Answers
0
You need to change the page index of grid and bind it in PageIndexChanged.
void GridView1_PageIndexChanging(Object sender, GridViewPageEventArgs e)
{
GridView1.CurrentPageIndex = e.NewPageIndex;
YourFunctionToBindGrid();
}

Adil
- 146,340
- 25
- 209
- 204
0
//Solved 100% work
use this code inside Page_index_Changing { GridView1.PageIndex = e.NewPageIndex; SqlCommand cmd = new SqlCommand("Select * from Requseted_movie ORDER BY [ID] DESC", con);
SqlDataAdapter DA1 = new SqlDataAdapter(cmd); DA1.Fill(DT1);
GridView1.DataSource = DT1;
GridView1.DataBind();
}

Vikas
- 1
-
Don't post the same answer to more than one question. If the questions are basically the same, [flag them](https://stackoverflow.com/privileges/flag-posts) as duplicates once you get enough rep. If they're different, customize the answer to the question's unique qualities. – Nathan Tuggy Apr 17 '17 at 02:42