| | |
disabling datagrid hyperlink column underline
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
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
[HTML]
ItemStyle-CssClass="tablecellhyperlinks"
[/HTML]
ASP.NET Syntax (Toggle Plain Text)
.tablecellhyperlinks { text-decoration: none; DISPLAY: block; }
[HTML]
ItemStyle-CssClass="tablecellhyperlinks"
[/HTML]
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
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)
.tablecellhyperlinks1 TD { text-decoration: none; DISPLAY: block; }
Last edited by jamello; Apr 3rd, 2007 at 9:47 am.
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.
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.
well this sill work for any hyperlinks anywhere on the page:
lets start with that and see what you get.
ASP.NET Syntax (Toggle Plain Text)
a:link { text-decoration: none; }
lets start with that and see what you get.
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)
a:link { text-decoration: none; }
lets start with that and see what you get.
![]() |
Similar Threads
- datagrid hyperlink (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Handler attached to Button.Click inside Gridview not firing
- Next Thread: Mulitple checkbox validation
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list listbox login menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols problem radio ratings reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml youareanotmemberofthedebuggerusers






