我在更新面板中有一个gridview,第一次点击页面索引正在改变,但后来点击页面索引没有改变。但是点击时会触发事件。这就是我绑定数据的方式。
protected void gvPurchaseDetails_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gvPurchaseDetails.PageIndex = e.NewPageIndex;
DetailsGridBind();
}
public void DetailsGridBind()
{
DataSet dsInvoice = ObjDetail.GetPurchaseDetails();
DataTable dtInvoice = dsInvoice.Tables[0];
gvPurchaseDetails.DataSource = dtInvoice;
gvPurchaseDetails.DataBind();
}