DataGrid and css

M

MA

Hi all!

I have set my CssClass property to gridstyle in my grid. It looks like this:

..gridstyle

{

border-style: solid;

border-width: 1px;

border-color: Black;

}

But nothing happends when I use this.

What am I doíng wrong??



/Marre
 
K

Ken Cox [Microsoft MVP]

It works okay for me as show below...

<HTML>
<HEAD>
<title>dgpagecell</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<style>
.gridstyle
{border-style: solid;
border-width: 1px;
border-color: Black;
}

</style>
</HEAD>
<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server">
<asp:DataGrid CssClass=gridstyle id="DataGrid1" runat="server"
ShowFooter="True" PageSize="2" AllowPaging="True">
<Columns>
<asp:BoundColumn DataField="Percentvalue" ReadOnly="True"
HeaderText="Percentvalue" DataFormatString="{0:p}"></asp:BoundColumn>
</Columns>
<PagerStyle Position="TopAndBottom" PageButtonCount="2"
Mode="NumericPages"></PagerStyle>
</asp:DataGrid>
</form>
</body>
</HTML>
 

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

Forum statistics

Threads
474,142
Messages
2,570,820
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top