disabling datagrid hyperlink column underline

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2006
Posts: 216
Reputation: jamello is an unknown quantity at this point 
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Posting Whiz in Training

disabling datagrid hyperlink column underline

 
0
  #1
Mar 12th, 2007
Hi there folks! Please could anyone tell me how I can disable the underline of a hyperlink button server control of datagrid and similar controls ? I had used the following css code on the ItemStyle-CssClass which works for traditional hyperlinks to no avail. Thanks for the help

  1.  
  2. .tablecellhyperlinks
  3. {
  4. text-decoration: none;
  5. DISPLAY: block;
  6. }

[HTML]
ItemStyle-CssClass="tablecellhyperlinks"
[/HTML]
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 275
Reputation: f1 fan is an unknown quantity at this point 
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: disabling datagrid hyperlink column underline

 
0
  #2
Mar 23rd, 2007
if it is in a table you have to have
td .tablecellhyperlinks in your css file.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 216
Reputation: jamello is an unknown quantity at this point 
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Posting Whiz in Training

Re: disabling datagrid hyperlink column underline

 
0
  #3
Mar 29th, 2007
I tried it but it doesn't work.

Originally Posted by f1 fan View Post
if it is in a table you have to have
td .tablecellhyperlinks in your css file.
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 275
Reputation: f1 fan is an unknown quantity at this point 
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: disabling datagrid hyperlink column underline

 
0
  #4
Mar 29th, 2007
my mistake for not concentrating while writing the post

try

.tablecellhyperlinks td
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 216
Reputation: jamello is an unknown quantity at this point 
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Posting Whiz in Training

Re: disabling datagrid hyperlink column underline

 
0
  #5
Apr 3rd, 2007
Thank you f1 fan for your replies.
The suggestion you made is not still working.

I do not know whether the structure of a datagrid control's hyperlink button rendering does qualify as and has the attribute of a valid table. It has no valid "tr" and "td" tags.

Below is an example of what I'm talking about


[html]
<asp:datagrid id="dgLocationLink" runat="server" Width="140px" OnItemDataBound="Grid_ItemClicked"
BorderWidth="0px" CellPadding="1" AutoGenerateColumns="False" Height="168px" CssClass="DefaultDataGridStyle">
<AlternatingItemStyle BackColor="#d7dce8"></AlternatingItemStyle>
<HeaderStyle Font-Size="15px" Font-Bold="True"></HeaderStyle>
<Columns>
<asp:HyperLinkColumn ItemStyle-CssClass="tablecellhyperlinks" Target="iA" DataNavigateUrlField="dToYou"
ItemStyle-BorderStyle="Groove" ItemStyle-BorderWidth="10" DataNavigateUrlFormatString="../alink1.aspx?idm={0}"
DataTextField="dToYou" HeaderText="You">
<HeaderStyle Height="40px" BackColor="#6b83c6"></HeaderStyle>
<ItemStyle Font-Size="20px" Height="40px"></ItemStyle>
</asp:HyperLinkColumn>
</Columns>
</asp:datagrid>
[/html]

while this is the css
  1.  
  2. .tablecellhyperlinks1 TD
  3. {
  4. text-decoration: none;
  5. DISPLAY: block;
  6. }
Last edited by jamello; Apr 3rd, 2007 at 9:47 am.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: disabling datagrid hyperlink column underline

 
0
  #6
Apr 3rd, 2007
  1. a.tablecellhyperlinks:link
  2. {
  3. text-decoration: none;
  4. }
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 216
Reputation: jamello is an unknown quantity at this point 
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Posting Whiz in Training

Re: disabling datagrid hyperlink column underline

 
0
  #7
Apr 3rd, 2007
Thanks for the reply Hollystyles.
I believe you saw the current post. Do I change any variable or parameter in the datagrid code/schema. If no is the answer then your suggestion did not work.

Originally Posted by hollystyles View Post
  1. a.tablecellhyperlinks:link
  2. {
  3. text-decoration: none;
  4. }
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: disabling datagrid hyperlink column underline

 
0
  #8
Apr 3rd, 2007
well this sill work for any hyperlinks anywhere on the page:

  1. a:link
  2. {
  3. text-decoration: none;
  4. }

lets start with that and see what you get.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 216
Reputation: jamello is an unknown quantity at this point 
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Posting Whiz in Training

Re: disabling datagrid hyperlink column underline

 
0
  #9
Apr 3rd, 2007
Yes this works. Although with not so clean results but at least it works. so what next. Thanks
Originally Posted by hollystyles View Post
well this sill work for any hyperlinks anywhere on the page:

  1. a:link
  2. {
  3. text-decoration: none;
  4. }

lets start with that and see what you get.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 16
Reputation: mIssy_ricco is an unknown quantity at this point 
Solved Threads: 1
mIssy_ricco mIssy_ricco is offline Offline
Newbie Poster

Re: disabling datagrid hyperlink column underline

 
0
  #10
Jul 8th, 2009
this is very useful for me..thanks!
i didn't use table or whatsoever..just a simple text and it works.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC