I have a repeater with a image buttons in the footer for paging. I also have linkbuttons in the header for sorting.The sorting works beautifully but the footer does not fire off the itemcommand event.
The cod ebehind in the page_Load is
Code:
<FooterTemplate>
<tr>
<td align="left" class="footer" colspan="10">
<pagerstyle cssclass="footer" font-italic="True" />
<pagertemplate></pagertemplate>
<asp:Label ID="PageLabel" runat="server" Text='<%# GetPagingInfo() %>' Visible="true"/>
<asp:ImageButton ID="Page_First" runat="server" CommandArgument="First" CommandName="Page" ImageUrl="~/images/first_page.gif" ToolTip="Back to First Page" />
<asp:ImageButton ID="Page_Prev" runat="server" CommandArgument="Prev" CommandName="Page" ImageUrl="~/images/prev_page.gif" ToolTip="Back One Page" />
<asp:ImageButton ID="Page_Next" runat="server" CommandArgument="Next" CommandName="Page" ImageUrl="~/images/next_page.gif" ToolTip="Forward One Page" />
<asp:ImageButton ID="Page_Last" runat="server" CommandArgument="Last" CommandName="Page" ImageUrl="~/images/last_page.gif" ToolTip="Forward to Last Page" />
<asp:ImageButton ID="PrintAllImageButton" runat="server" CommandName="PrintAll" ImageUrl="~/images/printer.gif" ToolTip="Print all pages" Width="20px" />
</td>
</tr>
</FooterTemplate>
The cod ebehind in the page_Load is
Code:
ar = new Pecos.AuditReview();
if (!IsPostBack)
{
//ViewState["sortdir"] = "desc";
ViewState["page"] = "1";
StartAt = 1;
dtefrom.MaxDate = DateTime.Now;
dtefrom.MinDate = DateTime.Now.AddYears(-1);
dtethru.MaxDate = DateTime.Now;
dtethru.MinDate = DateTime.Now.AddYears(-1);
dtefrom.SelectedDate = DateTime.Now.AddDays(-1);
dtethru.SelectedDate = DateTime.Now;
TableName = String.Empty;
}
if(ddlTablenames.SelectedIndex<=0) LoadTableNames();
PageSize = Int32.Parse(Master.Pecos.Preferences["Default.PageSize"].ToString());
ddlRecordIds.Visible = ddlTablenames.SelectedIndex>0?true:false;
FromDate = dtefrom.SelectedDate.ToShortDateString();
ToDate = dtethru.SelectedDate.ToShortDateString();
Action = "sel";
rptAuditActionsInformation.DataSource = ar.GetAuditRecordsCommand();
rptAuditActionsInformation.DataBind();
this.rptAuditActionsInformation.ItemCommand += new System.Web.UI.WebControls.RepeaterCommandEventHandler(this.rptAuditActionsInformation_ItemCommand);
Comment