Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Mike Chamberlain #1
Make links different color in the datagrid
Hi.
I'm using the standard datagrid control in my ASP.NET page. I have the
latest version and all service packs of the framework installed. I am
using the property builder to create my grid. My question is simple:
How do I make the links in different cells adopt a specific CSS class?
For instance, my header row in set to maroon and my links set to white.
This makes the sortable columns headings display nicely (white on
maroon background). But if I try to use a link somewhere else in my
grid (ie. a Hyperlink column) then it also appears as white on a WHITE
background.
How do I make the links in the header row use CSS class .linkHeader, but
make the links in the hyperlink column use .linkStandard? I tried the
following but obviously it doesn't work:
<asp:HyperLinkColumn Text="..." DataNavigateUrlField="master_id_account"
DataNavigateUrlFormatString="Edit.aspx?masterIdAcc ount={0}"
CssClass="linkStandard"></asp:HyperLinkColumn>
['System.Web.UI.WebControls.HyperLinkColumn' does not have a property
named 'CssClass'.]
Mike
Mike Chamberlain Guest
-
removal of border color for image links
"thysta11" webforumsuser@macromedia.com wrote: Try the "IE Link Scrubber" extension available the DW Exchange (the MM site). -- Dan... -
Changing Individual Text Links Font color
I need to change the color of some of my Text Links to a different color than that of my page properties. I knew at one point in time how to do... -
links in text field - change color on hover
is there a way to make the links in a text field have a css equivalent of a:hover? -
Resetting "Visited" links to "links" color when new browser opens
HELP! This should be simple, but I can't find info: In using CSS for font color for text hyperlinks, I have mine set so that the "links" are a... -
how to make url links on a bitmap?
i'm having problem on bitmaps on how to put a link on it. could somebody help? -
Mike Chamberlain #2
Re: Make links different color in the datagrid
Mike Chamberlain wrote:
I found a partial workaround myself. First set the UseAccessibleHeader> Hi.
>
> I'm using the standard datagrid control in my ASP.NET page. I have the
> latest version and all service packs of the framework installed. I am
> using the property builder to create my grid. My question is simple:
> How do I make the links in different cells adopt a specific CSS class?
>
> For instance, my header row in set to maroon and my links set to white.
> This makes the sortable columns headings display nicely (white on
> maroon background). But if I try to use a link somewhere else in my
> grid (ie. a Hyperlink column) then it also appears as white on a WHITE
> background.
>
> How do I make the links in the header row use CSS class .linkHeader, but
> make the links in the hyperlink column use .linkStandard? I tried the
> following but obviously it doesn't work:
>
> <asp:HyperLinkColumn Text="..." DataNavigateUrlField="master_id_account"
> DataNavigateUrlFormatString="Edit.aspx?masterIdAcc ount={0}"
> CssClass="linkStandard"></asp:HyperLinkColumn>
>
> ['System.Web.UI.WebControls.HyperLinkColumn' does not have a property
> named 'CssClass'.]
>
> Mike
property of the grid to True, which tells it to render the table
properly (using <TH> tags for the header cells rather than <TD> - why
this isn't the default is beyond me). Then, two styles can be defined
TH A { color:white; }
TD A { color:maroon; }
which works fine for now. But what happens if I want to have a link of
one color in one Hyperlink column, and one of a different color in another?
Any suggestions appreciated.
Mike
Mike Chamberlain Guest
-
Riki #3
Re: Make links different color in the datagrid
Mike Chamberlain wrote:
If the other columns don't contain links, you can set the CssClass property> Hi.
>
> I'm using the standard datagrid control in my ASP.NET page. I have
> the latest version and all service packs of the framework installed. I am
> using the property builder to create my grid. My question is
> simple: How do I make the links in different cells adopt a specific
> CSS class?
> For instance, my header row in set to maroon and my links set to
> white. This makes the sortable columns headings display nicely
> (white on maroon background). But if I try to use a link somewhere
> else in my grid (ie. a Hyperlink column) then it also appears as
> white on a WHITE background.
>
> How do I make the links in the header row use CSS class .linkHeader,
> but make the links in the hyperlink column use .linkStandard? I
> tried the following but obviously it doesn't work:
>
> <asp:HyperLinkColumn Text="..."
> DataNavigateUrlField="master_id_account"
> DataNavigateUrlFormatString="Edit.aspx?masterIdAcc ount={0}"
> CssClass="linkStandard"></asp:HyperLinkColumn>
> ['System.Web.UI.WebControls.HyperLinkColumn' does not have a property
> named 'CssClass'.]
>
> Mike
of the ItemStyle and AlternatingItemStyle.
--
Riki
Riki Guest



Reply With Quote

