这是我的代码
<asp:Repeater ID="rpRatesheetDetails" runat="server"
onitemcommand="rpRatesheetDetails_ItemCommand"
onitemdatabound="rpRatesheetDetails_ItemDataBound">
<HeaderTemplate>
<tr>
<td width="110" height="25px" class="content">
<table cellpadding="0" cellspacing="1">
<tr>
<td style="cursor:pointer;" runat="server" onclick="toggle();">
Carrier
</td>
<td align="right">
<asp:ImageButton ID="btnCarrierSortAsc" runat="server" ImageUrl="~/Images/Arrow_T.png" ToolTip="Sort Ascending Order" style="display:none;"
CommandName="SortCarrierASC" />
</td>
<td align="right">
<asp:ImageButton ID="btnCarrierSortDsc" runat="server" ImageUrl="~/Images/Arrow_B.png" ToolTip="Sort Descending Order" style="display:none;"
CommandName="SortCarrierDESC" />
</td>
</tr>
</table>
</td>
<td width="110" class="content">
<table cellpadding="0" cellspacing="1">
<tr>
<td>
Date
</td>
<td align="right">
<asp:ImageButton ID="btnDateSortAsc" runat="server" ImageUrl="~/Images/Arrow_T.png" ToolTip="Sort Ascending Order" style="display:none;"
CommandName="SortDateASC" />
</td>
<td align="right">
<asp:ImageButton ID="btnDateSortDesc" runat="server" ImageUrl="~/Images/Arrow_B.png" ToolTip="Sort Descending Order" style="display:none;"
CommandName="SortDateDESC" />
</td>
</tr>
</table>
</td>
<td width="82" class="content">
Call Type
</td>
<td width="110" class="content">
Format
</td>
<td width="100" class="content">
<table cellpadding="0" cellspacing="1">
<tr>
<td>
Status
</td>
<td align="right">
<asp:ImageButton ID="btnStatusAsc" runat="server" ImageUrl="~/Images/Arrow_T.png" ToolTip="Sort Ascending Order" style="display:none;"
CommandName="SortStatusASC" />
</td>
<td align="right">
<asp:ImageButton ID="btnStatusDsc" runat="server" ImageUrl="~/Images/Arrow_B.png" ToolTip="Sort Descending Order" style="display:none;"
CommandName="SortStatusDESC" />
</td>
</tr>
</table>
</td>
<td width="70" class="content">
User
</td>
<td width="82" class="content">
File Name
</td>
<td width="110" class="content">
System
</td>
<td width="110" class="content">
<table cellpadding="0" cellspacing="1">
<tr>
<td>
No. Of Days
</td>
<td align="right">
<asp:ImageButton ID="btnDaysAsc" runat="server" ImageUrl="~/Images/Arrow_T.png" ToolTip="Sort Ascending Order"
CommandName="SortNoOfDaysASC" />
<asp:ImageButton ID="btnDaysDsc" runat="server" ImageUrl="~/Images/Arrow_B.png" ToolTip="Sort Descending Order"
CommandName="SortNoOfDaysDESC" />
</td>
</tr>
</table>
</td>
</tr>
</HeaderTemplate>
以上是我的转发器的标题模板。默认情况下,当我的转发器加载时,它按最后一列排序。现在我想要 dat,如果用户想按任何其他列排序,他应该单击 dat 列。只有 den 排序图标才会将显示并且记录将被排序。我在 ItemDataBound 事件上显示此图标,但是如何在单击标题时触发 ItemDataBound 事件?