944,133 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 8004
  • ASP.NET RSS
Mar 12th, 2007
0

disabling datagrid hyperlink column underline

Expand Post »
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

ASP.NET Syntax (Toggle Plain Text)
  1.  
  2. .tablecellhyperlinks
  3. {
  4. text-decoration: none;
  5. DISPLAY: block;
  6. }

[HTML]
ItemStyle-CssClass="tablecellhyperlinks"
[/HTML]
Similar Threads
Reputation Points: 215
Solved Threads: 6
Posting Whiz in Training
jamello is offline Offline
219 posts
since Oct 2006
Mar 23rd, 2007
0

Re: disabling datagrid hyperlink column underline

if it is in a table you have to have
td .tablecellhyperlinks in your css file.
Reputation Points: 26
Solved Threads: 11
Posting Whiz in Training
f1 fan is offline Offline
275 posts
since Jan 2006
Mar 29th, 2007
0

Re: disabling datagrid hyperlink column underline

I tried it but it doesn't work.

Click to Expand / Collapse  Quote originally posted by f1 fan ...
if it is in a table you have to have
td .tablecellhyperlinks in your css file.
Reputation Points: 215
Solved Threads: 6
Posting Whiz in Training
jamello is offline Offline
219 posts
since Oct 2006
Mar 29th, 2007
0

Re: disabling datagrid hyperlink column underline

my mistake for not concentrating while writing the post

try

.tablecellhyperlinks td
Reputation Points: 26
Solved Threads: 11
Posting Whiz in Training
f1 fan is offline Offline
275 posts
since Jan 2006
Apr 3rd, 2007
0

Re: disabling datagrid hyperlink column underline

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
ASP.NET Syntax (Toggle Plain Text)
  1.  
  2. .tablecellhyperlinks1 TD
  3. {
  4. text-decoration: none;
  5. DISPLAY: block;
  6. }
Last edited by jamello; Apr 3rd, 2007 at 9:47 am.
Reputation Points: 215
Solved Threads: 6
Posting Whiz in Training
jamello is offline Offline
219 posts
since Oct 2006
Apr 3rd, 2007
0

Re: disabling datagrid hyperlink column underline

ASP.NET Syntax (Toggle Plain Text)
  1. a.tablecellhyperlinks:link
  2. {
  3. text-decoration: none;
  4. }
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
Apr 3rd, 2007
0

Re: disabling datagrid hyperlink column underline

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.

ASP.NET Syntax (Toggle Plain Text)
  1. a.tablecellhyperlinks:link
  2. {
  3. text-decoration: none;
  4. }
Reputation Points: 215
Solved Threads: 6
Posting Whiz in Training
jamello is offline Offline
219 posts
since Oct 2006
Apr 3rd, 2007
0

Re: disabling datagrid hyperlink column underline

well this sill work for any hyperlinks anywhere on the page:

ASP.NET Syntax (Toggle Plain Text)
  1. a:link
  2. {
  3. text-decoration: none;
  4. }

lets start with that and see what you get.
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
Apr 3rd, 2007
0

Re: disabling datagrid hyperlink column underline

Yes this works. Although with not so clean results but at least it works. so what next. Thanks
well this sill work for any hyperlinks anywhere on the page:

ASP.NET Syntax (Toggle Plain Text)
  1. a:link
  2. {
  3. text-decoration: none;
  4. }

lets start with that and see what you get.
Reputation Points: 215
Solved Threads: 6
Posting Whiz in Training
jamello is offline Offline
219 posts
since Oct 2006
Jul 8th, 2009
0

Re: disabling datagrid hyperlink column underline

this is very useful for me..thanks!
i didn't use table or whatsoever..just a simple text and it works.
Reputation Points: 7
Solved Threads: 1
Light Poster
mIssy_ricco is offline Offline
25 posts
since Jul 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Handler attached to Button.Click inside Gridview not firing
Next Thread in ASP.NET Forum Timeline: Mulitple checkbox validation





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC