PageIndexChanging in GridView in ASP.NET

后端 未结 4 2170
我寻月下人不归
我寻月下人不归 2021-02-05 05:09

I have a gridview which I am using to display a dataset result. The problem is I am using paging in it. But when I click on the page # it says that I haven\'t handled the event.

4条回答
  •  没有蜡笔的小新
    2021-02-05 05:43

    Try the following code:

    protected void grdView_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        FillGrid();
        grdView.PageIndex = e.NewPageIndex;
        grdView.DataBind();
    }
    

提交回复
热议问题