Sorting in Repeater
<p>Here is my code</p>

<pre><code>&lt;asp:Repeater ID="rpRatesheetDetails" runat="server" 
                        onitemcommand="rpRatesheetDetails_ItemCommand" 
                        onitemdatabound="rpRatesheetDetails_ItemDataBound"&gt;
                        &lt;HeaderTemplate&gt;
                            &lt;tr&gt;
                                &lt;td width="110" height="25px" class="content"&gt;
                                    &lt;table cellpadding="0" cellspacing="1"&gt;
                                        &lt;tr&gt;
                                            &lt;td style="cursor:pointer;" runat="server" onclick="toggle();"&gt;
                                                Carrier
                                            &lt;/td&gt;
                                            &lt;td align="right"&gt;
                                                &lt;asp:ImageButton ID="btnCarrierSortAsc" runat="server" ImageUrl="~/Images/Arrow_T.png" ToolTip="Sort Ascending Order" style="display:none;"
                                                    CommandName="SortCarrierASC" /&gt;
                                            &lt;/td&gt;
                                            &lt;td align="right"&gt;
                                                &lt;asp:ImageButton ID="btnCarrierSortDsc" runat="server" ImageUrl="~/Images/Arrow_B.png" ToolTip="Sort Descending Order" style="display:none;"
                                                    CommandName="SortCarrierDESC" /&gt;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                    &lt;/table&gt;
                                &lt;/td&gt;
                                &lt;td width="110" class="content"&gt;
                                    &lt;table cellpadding="0" cellspacing="1"&gt;
                                        &lt;tr&gt;
                                            &lt;td&gt;
                                                Date
                                            &lt;/td&gt;
                                            &lt;td align="right"&gt;
                                                &lt;asp:ImageButton ID="btnDateSortAsc" runat="server" ImageUrl="~/Images/Arrow_T.png"  ToolTip="Sort Ascending Order" style="display:none;"
                                                    CommandName="SortDateASC" /&gt;
                                            &lt;/td&gt;
                                            &lt;td align="right"&gt;
                                                &lt;asp:ImageButton ID="btnDateSortDesc" runat="server" ImageUrl="~/Images/Arrow_B.png" ToolTip="Sort Descending Order" style="display:none;"
                                                    CommandName="SortDateDESC" /&gt;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                    &lt;/table&gt;
                                &lt;/td&gt;
                                &lt;td width="82" class="content"&gt;
                                    Call Type
                                &lt;/td&gt;
                                &lt;td width="110" class="content"&gt;
                                    Format
                                &lt;/td&gt;
                                &lt;td width="100" class="content"&gt;
                                    &lt;table cellpadding="0" cellspacing="1"&gt;
                                        &lt;tr&gt;
                                            &lt;td&gt;
                                                Status
                                            &lt;/td&gt;
                                            &lt;td align="right"&gt;
                                                &lt;asp:ImageButton ID="btnStatusAsc" runat="server" ImageUrl="~/Images/Arrow_T.png" ToolTip="Sort Ascending Order" style="display:none;"
                                                    CommandName="SortStatusASC" /&gt;
                                            &lt;/td&gt;
                                            &lt;td align="right"&gt;
                                                &lt;asp:ImageButton ID="btnStatusDsc" runat="server" ImageUrl="~/Images/Arrow_B.png" ToolTip="Sort Descending Order" style="display:none;"
                                                    CommandName="SortStatusDESC" /&gt;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                    &lt;/table&gt;
                                &lt;/td&gt;
                                &lt;td width="70" class="content"&gt;
                                    User
                                &lt;/td&gt;
                                &lt;td width="82" class="content"&gt;
                                    File Name
                                &lt;/td&gt;
                                &lt;td width="110" class="content"&gt;
                                    System
                                &lt;/td&gt;
                                &lt;td width="110" class="content"&gt;
                                    &lt;table cellpadding="0" cellspacing="1"&gt;
                                        &lt;tr&gt;
                                            &lt;td&gt;
                                                No. Of Days
                                            &lt;/td&gt;
                                            &lt;td align="right"&gt;
                                                &lt;asp:ImageButton ID="btnDaysAsc" runat="server" ImageUrl="~/Images/Arrow_T.png" ToolTip="Sort Ascending Order"
                                                    CommandName="SortNoOfDaysASC" /&gt;
                                                 &lt;asp:ImageButton ID="btnDaysDsc" runat="server" ImageUrl="~/Images/Arrow_B.png" ToolTip="Sort Descending Order"
                                                    CommandName="SortNoOfDaysDESC" /&gt;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                    &lt;/table&gt;
                                &lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/HeaderTemplate&gt;
</code></pre>

<p>Above is the header template of my repeater.By default when my repeater loads it is sorted by the last column.Now i want dat if the user want to sort by any other column he should click on dat column.Only den the sort icon will be shown and the records will be sorted.I am showing this icon on the ItemDataBound event but how to fire an ItemDataBound event while clicking on header??</p>
