DataGrid and links...

G

Guest

Hi.
I have a DataGrid control that has one HyperLinkColumn, and this page has a
"default.css" loaded, so, the link Style of the DataGrid is the same of the
css document... but I want to change it, the link style of the Datagrid must
be different from the others.. Even if I set all the format of the datagrid,
everything changes... except the link style. Anyone know any way to fix this?
I do not know even if I could do this in the css document, since this is the
first time that I am using it...

Any suggestion would be very useful.
Thanks in advance.
 
G

Guest

Hi ltt19,
You can define you style and plug it itemstyle for the Hyperlinkcolumn
Example:
<style type="text/css">
.ErrorRed
{
font-family: Verdana, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
color: red
}

</style>

<asp:DataGrid ID="Datagrid1" Runat="server" GridLines="Vertical" >
</asp:HyperLinkColumn>
or
</asp:HyperLinkColumn>

</Columns>
</asp:DataGrid>


Do u CSS according to your style needed and the inject the css to the
corresponding item in the way mentioned above,

Hope this helps you

Thanks

IntelYogi
 
G

Guest

Thanks by you effort IntelYogi, but this is not working...
I tried to to this before, but, for instance, using you code, is just
becames "bold" but the color still the same....
Here is the code of my DataGrid.. maybe this can help...

<asp:datagrid id="dtgLinks" runat="server" BorderColor="#9DAFC2"
BorderStyle="None" BorderWidth="1px"
BackColor="#F6F6F9" CellPadding="1" AutoGenerateColumns="False"
Width="616px" Font-Size="X-Small" Font-Names="Verdana" CellSpacing="1">

<FooterStyle Font-Size="X-Small" ForeColor="#003399"
BackColor="#99CCCC"></FooterStyle>
<SelectedItemStyle Font-Size="Small" ForeColor="#CCFF99"
BackColor="#F6F6F9"></SelectedItemStyle>
<EditItemStyle Font-Size="X-Small" BackColor="#F6F6F9"></EditItemStyle>
<AlternatingItemStyle Font-Size="X-Small"
BackColor="WhiteSmoke"></AlternatingItemStyle>
<ItemStyle Font-Size="X-Small" ForeColor="Black"
BackColor="#F6F6F9"></ItemStyle>
<HeaderStyle Font-Size="X-Small" Font-Names="Verdana" ForeColor="#336699"
BackColor="#F6F6F9"></HeaderStyle>
<Columns>
<asp:HyperLinkColumn Target="_blank" DataNavigateUrlField="link"
DataTextField="name" HeaderText="Nome"><HeaderStyle
Font-Size="X-Small"></HeaderStyle>
<ItemStyle Font-Size="X-Small" Font-Names="Verdana"
ForeColor="Black"></ItemStyle>
<FooterStyle Font-Size="X-Small"></FooterStyle>
</asp:HyperLinkColumn>
<asp:BoundColumn DataField="description" HeaderText="Descrição">
<HeaderStyle Font-Size="X-Small"></HeaderStyle>
<ItemStyle Font-Size="X-Small"></ItemStyle>
<FooterStyle Font-Size="X-Small"></FooterStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle Font-Size="X-Small" HorizontalAlign="Left" ForeColor="#003399"
BackColor="#99CCCC"
Mode="NumericPages"></PagerStyle>
</asp:datagrid>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top