Reputation: 729
using paging in grid view but as i go through pagess i need to click on page links.. it should work on single click .. but it goes other page only after double click... any idea why..
Upvotes: 0
Views: 422
Reputation: 10115
simple and working
protected void grd_receipt_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
grd_receipt.PageIndex = e.NewPageIndex;
grd_receipt.DataBind();
}
simply call the databind after
Upvotes: 1
Reputation: 7539
Make sure your code to call DataBind() on your grid is in it's own method. You'll need to call it in two places.
This will eliminate your problem.
Upvotes: 0