Hello all.
I'm having a little bit of trouble sorting out the paging scenario with a gridview i.e. I can't get the bloody thing to show page, 2, 3, 4, etc.
I have the following Grid view code
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
style="z-index: 1; left: 20px; top: 440px; position: absolute; height: 133px; "
AllowPaging="True" AllowSorting="True" Font-Size="Small"
PageSize="2" onpageindexchanging="GridView1_PageIndexChanging">
<Columns>
With the following
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
Now, I am getting a "TargetinvocationException was unhandled by user code."
Being a newbie, this is beyond my current capabilities and has confused me somewhat. How do I go about binding my gridview properly to allow for the paging to be operate correctly?