Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-27-2006, 04:52 AM   #1 (permalink)
rikb53
Registered User
 
Join Date: Jan 2006
Posts: 29
rikb53 is on a distinguished road
Sort Expression,Header is now a Link

hey guys, ive got a data grid using the onSortCommand methods.
everything is working fine - i even was able to make this thing sort - Asc and Desc, by using a dataview and the Sort Property of that.
but my question is. when you use a Sort Function like this, the Header is then changed to a Link Style with the UnderLine, and of course it turns purple after its visited.
i know how to make that go away in JavaScript if it was a hyperlink with an anchor tag, but how can i do it in the datagrid itself, i've looked at all of the header properties and just cant find a thing.
i'm probably missing something really simple.
has anyone ever encountered this?
thanks
rik


<ASPatagrid id="DG1" runat="server" AutoGenerateColumns="False"
AllowSorting="true" onSortCommand="SortEventHandler">
...
<Columns>
<asp:BoundColumn DataField="First_Name" SortExpression="First_Name"
HeaderText="First Name" />
<asp:BoundColumn DataField="Last_Name" SortExpression="Last_Name"
HeaderText="Last_Name" />

works great but has the header now with an underline and turns purple after the first hit
rikb53 is offline   Reply With Quote
Old 02-27-2006, 07:15 PM   #2 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
If you are fimiliar with Styles you could either use a style tag or create a class in your style sheet and reference the class in the cssClass property to change the link to the approipriate color.
__________________
~Ryan

rdove is offline   Reply With Quote
Old 02-28-2006, 03:35 AM   #3 (permalink)
rikb53
Registered User
 
Join Date: Jan 2006
Posts: 29
rikb53 is on a distinguished road
great idea. i already have a css style sheet assigned to the page. i just need to figure out how to tell the datagrid itself to recognized that stylesheet and then each column header to recognize the class i built for that.
specifically
.myHeader
{
Text-Decoration: none;
}
hopefully that will work.
thanks for the suggestion
rik
rikb53 is offline   Reply With Quote
Old 02-28-2006, 03:36 AM   #4 (permalink)
rikb53
Registered User
 
Join Date: Jan 2006
Posts: 29
rikb53 is on a distinguished road
great idea. i already have a css style sheet assigned to the page. i just need to figure out how to tell the datagrid itself to recognized that stylesheet and then each column header to recognize the class i built for that.
specifically
.myHeader
{
Text-Decoration: none;
}
hopefully that will work.
thanks for the suggestion
rik
rikb53 is offline   Reply With Quote
Old 03-01-2006, 07:17 AM   #5 (permalink)
rikb53
Registered User
 
Join Date: Jan 2006
Posts: 29
rikb53 is on a distinguished road
well, the css doesnt work. i mean it does work. i can add colors and all sorts of things, but getting rid of the underline is not happening
thanks
rik
rikb53 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hide target link rivers9 HTML, XML, Javascript, AJAX 8 08-25-2005 12:05 PM
copy a directory link with -Rs sde Linux / BSD / OS X 3 02-15-2005 05:34 PM


All times are GMT -8. The time now is 06:49 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting