Hi Everyone,
The below code works in a normal aspx page but not in my module, in my module when I click teh second page it simply refreshes and display no datagrid at all.
Can anyone tell me why this would be happening or if my code is wrong help me fix it?
Sub grdAddressBook_PageIndexChanged(ByVal s As Object, ByVal e As DataGridPageChangedEventArgs)
grdAddressBook.CurrentPageIndex = e.NewPageIndex
grdAddressBook.DataBind()
End Sub
" NavigateUrl=''>" imageurl="~/images/edit.gif">' Runat="server">' Runat="server">" NavigateUrl=''>" imageurl="~/images/edit.gif">' Runat="server">' Runat="server">" NavigateUrl=''>" imageurl="~/images/edit.gif">' Runat="server">' Runat="server"><asp:datagrid id="grdAddressBook" runat="server" Width="98%" BorderColor="#003399" BorderStyle="None"
BorderWidth="1px" BackColor="White" CellPadding="4" AutoGenerateColumns="False" AllowPaging="True"
OnPageIndexChanged="grdAddressBook_PageIndexChanged" PageSize="2">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink id="editAddressBook" NavigateUrl='<%# EditURL("ItemID",DataBinder.Eval(Container.DataItem,"ItemID")) %>' Visible="<%# IsEditable %>" runat="server">
<asp:image id="editAddressBookImage" imageurl="~/images/edit.gif" visible="<%# IsEditable %>" alternatetext="Edit" runat="server" resourcekey="Edit"/>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="FirstName" HeaderText="FirstName">
<HeaderStyle CssClass="NormalBold"></HeaderStyle>
<ItemStyle CssClass="Normal"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="LastName" HeaderText="LastName">
<HeaderStyle CssClass="NormalBold"></HeaderStyle>
<ItemStyle CssClass="Normal"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="Email1">
<HeaderStyle CssClass="NormalBold"></HeaderStyle>
<ItemStyle CssClass="Normal"></ItemStyle>
<ItemTemplate>
<asp:Label ID="lblEmail" Runat="server" Text='<%# DisplayEmail(DataBinder.Eval(Container.DataItem, "Email1")) %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Email2">
<HeaderStyle CssClass="NormalBold"></HeaderStyle>
<ItemStyle CssClass="Normal"></ItemStyle>
<ItemTemplate>
<asp:Label ID="lblEmail2" Runat="server" Text='<%# DisplayEmail(DataBinder.Eval(Container.DataItem, "Email2")) %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="HomePhone" HeaderText="Home Phone">
<HeaderStyle CssClass="NormalBold"></HeaderStyle>
<ItemStyle CssClass="Normal"></ItemStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" Mode="NumericPages"></PagerStyle>
</asp:datagrid>
I have to admit this has got me stumped
Regards
Brad