|
-
Sep 23rd, 2003, 01:32 PM
#1
Thread Starter
Addicted Member
CSS Bound DataGrid [resolved]
Hi,
I have a bound Hyperlink column in an asp.net datagrid. I need to use CSS to control the forecolor and mouse over color of the link. Any Ideas on where to start?
Last edited by MasterBlaster; Sep 23rd, 2003 at 06:13 PM.
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
-
Sep 23rd, 2003, 06:13 PM
#2
Thread Starter
Addicted Member
FYI
Never Mind, found it
Code:
private void DG_mygrid_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
{
HyperLink ColLink = (HyperLink)e.Item.Cells[1].Controls[0];
ColLink.CssClass = "GridLink";
}
}
CSS Class
Code:
/* DataGrid links */
.GridLink:link { color: #666666; text-decoration: none; }
.GridLink:visited { color: #666666; text-decoration: none; }
.GridLink:hover { color: #FF6600; text-decoration: none; }
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
-
Jan 31st, 2004, 09:35 PM
#3
Fanatic Member
sorry for bringing up an old thread but i'm having trouble doing this.
In designer I've set the datagrids class to Topics, and then in the css file i've got
.Topics:link
{
font-family:Arial;
font-size:small;
text-decoration:none;
}
but it won't format my links at all!!!
what am i doing wrong? This is my first attempt at using style sheets and it's proving quite frustrating!
Cheers
Nick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|