R
rn5a
A DataGrid has the following TemplateColumn:
<aspataGrid ID="dgCart"...OnSortCommand="SortGrid"
AllowSorting="true"....>
<Column>
<asp:TemplateColumn HeaderImageUrl="Images\Up.gif" HeaderText="ID"
SortExpression="PID">
<ItemTemplate>
<asp:Label ID="lblPID" Text=<%# Container.DataItem("PID") %>
runat="server"/>
</ItemTemplate>
</TemplateColumn>
</Columns>
</aspataGrid>
It seems the HeaderImageUrl is given precedence over the HeaderText
since the Header just displays the image & not the text. How do I
display both HeaderText & HeaderImageUrl together?
The DataGrid allows sorting & by default, the DataGrid is sorted
ascendingly on the above column. When a user clicks the header Label
again, the column gets sorted descendingly....so far so good but I did
like to change the HeaderImageUrl at the same time so that users can
easily make out whether a column is sorted ascendingly or
descendingly.
Can someone please give me some idea on how do I go about it?
<aspataGrid ID="dgCart"...OnSortCommand="SortGrid"
AllowSorting="true"....>
<Column>
<asp:TemplateColumn HeaderImageUrl="Images\Up.gif" HeaderText="ID"
SortExpression="PID">
<ItemTemplate>
<asp:Label ID="lblPID" Text=<%# Container.DataItem("PID") %>
runat="server"/>
</ItemTemplate>
</TemplateColumn>
</Columns>
</aspataGrid>
It seems the HeaderImageUrl is given precedence over the HeaderText
since the Header just displays the image & not the text. How do I
display both HeaderText & HeaderImageUrl together?
The DataGrid allows sorting & by default, the DataGrid is sorted
ascendingly on the above column. When a user clicks the header Label
again, the column gets sorted descendingly....so far so good but I did
like to change the HeaderImageUrl at the same time so that users can
easily make out whether a column is sorted ascendingly or
descendingly.
Can someone please give me some idea on how do I go about it?