I have a gridview with sorting implement. Here is a bit of the code.
The grid has 4 columns. 2 of them you can sort on. But the text in those two column headers - that you click on to sort - is being formatted to look like a hyperlink. This formatting is not done by me - it seems to be happening itself.Code:<asp:GridView ID="gvDetails" runat="server" DataKeyNames="SSID" AutoGenerateColumns="False" Width="100%" CssClass="GridHeadDisplay" OnRowDeleting="gvSSDetails_RowDeleting" AllowSorting="true" OnSorting="gvSSDetails_Sorting" OnRowDataBound="gvSSDetails_RowDataBound"> <RowStyle CssClass="GridItemDisplay" /> <EmptyDataTemplate> <asp:Label ID="Label1" runat="server"> <font style="font-size: 10pt; font-family: Tahoma;" >No records Found</font> </asp:Label> </EmptyDataTemplate> <Columns> <asp:BoundField DataField="OrganisationID" HeaderText="OrganisationID" Visible="False" /> <asp:TemplateField HeaderText="Organisation" SortExpression="OrgName">
The whole header row is formatted by CssClass="GridHeadDisplay" - so I have a row with blue backgrounds to the cells with white text in them - apart from the two that you can sort on that look like the standard blue, underlined hyperlinks.
How can I make the text in the two column header cells you can sort on look the same as the text in the other columns?
Thanks for any help.




Reply With Quote