<asp:GridView ID="GridView1" runat="server" AllowPaging="True" EnableSortingAndPagingCallbacks="True" PageSize="5" OnPageIndexChanging="gvpageindex" > Default.aspx.cs: protected void gvpageindex(object sender, GridViewPageEventArgs e) { GridView1.PageIndex = e.NewPageIndex; GridView1.DataSource = ds1.GetData(); GridView1.DataBind(); } protected void Button1_Click(object sender, EventArgs e) { GridView1.DataSource = ds1.GetData(); GridView1.DataBind(); }
Have you made sure that the GridView has AutoGenerateColumns set to true? GridView.AutoGenerateColumns = True
can you please use EnableSortingAndPagingCallbacks="False" <asp:gridview id="GridView1" runat="server" allowpaging="True" enablesortingandpagingcallbacks="False" xmlns:asp="#unknown"> PageSize="5" OnPageIndexChanging="gvpageindex" > </asp:gridview>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)