Hi
I have a few template columns in my grid and each has a header template.
Within the header template I have got 2 controls, one is a link button
and other image. There is a sort command on each of the header columns
and an image which shows whether descending or ascending.
<asp:TemplateColumn HeaderText="Name">
<HeaderTemplate>
<asp:LinkButton ID="link1" CommandArgument="id" CommandName="Sort"
Runat="server">id</asp:LinkButton>
<asp:Image ID="imgId" runat="server" ImageUrl="asc.jpg"
Visible="false"></asp:Image>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblId" Text='<%#DataBinder.Eval(Container.DataItem
,"Id")%>'runat=server></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
I have to show the image only on the column that is being sorted. How
can I get access to the image control which is within the header control
in the SortCommand Event some thing like FindControl("imgId"). I saw the
sender object lists only the columns which are within ItemTemplate and
not the HeaderTemplate. Can anyone help me out?
Regards
RJN
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!