473,466 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Datagrid header style


I have defined a datagrid. This datagrid has a fixed header and
scrollable body. I have defined vertical gridlines in the datagri
properties - I assumed these vertical lines would be in both the heade
and the body of the grid. The problem is the vertical gridlines ar
appearing in the body of the datagrid, but not in the header. I'v
tried setting all different kinds of properties in the <headerstyle> t
get the vertical lines, but nothing works. I am sure I'm missin
something simple. Any ideas? Here is the datagrid html:

<TD vAlign="top">
<div style="OVERFLOW: auto; HEIGHT: 300px">
<asp:datagrid id="dgTimeTable" runat="server" BorderColor="Black
BorderStyle="None" BackColor="White" cellPadding="3
GridLines="Vertical" BorderWidth="1px" EnableViewState="False
ItemStyle-HorizontalAlign="Right" ShowHeader="True">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<HeaderStyle Font-Bold="True" Wrap="False" HorizontalAlign="Center
BorderWidth="1px" BorderColor="Black" CssClass="gridFixedHeader
VerticalAlign="Bottom" BackColor="WhiteSmoke"></HeaderStyle>
</asp:datagrid>
</div>
</TD>

Here is my "gridFixedHeader" definition from my style sheet:
.gridFixedHeader
{
background-color:white;
position:relative;
top:expression(this.offsetParent.scrollTop);
}
Thanks in advance for any suggestions!

Rosann

--
Rosann
-----------------------------------------------------------------------
Rosanne's Profile: http://www.highdots.com/forums/m28
View this thread: http://www.highdots.com/forums/t284344

Nov 19 '05 #1
2 3054
Rosanne wrote:
I have defined a datagrid. This datagrid has a fixed header and a
scrollable body. I have defined vertical gridlines in the datagrid
properties - I assumed these vertical lines would be in both the header
and the body of the grid. The problem is the vertical gridlines are
appearing in the body of the datagrid, but not in the header. I've
tried setting all different kinds of properties in the <headerstyle> to
get the vertical lines, but nothing works. I am sure I'm missing
something simple. Any ideas? Here is the datagrid html:

<TD vAlign="top">
<div style="OVERFLOW: auto; HEIGHT: 300px">
<asp:datagrid id="dgTimeTable" runat="server" BorderColor="Black"
BorderStyle="None" BackColor="White" cellPadding="3"
GridLines="Vertical" BorderWidth="1px" EnableViewState="False"
ItemStyle-HorizontalAlign="Right" ShowHeader="True">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<HeaderStyle Font-Bold="True" Wrap="False" HorizontalAlign="Center"
BorderWidth="1px" BorderColor="Black" CssClass="gridFixedHeader"
VerticalAlign="Bottom" BackColor="WhiteSmoke"></HeaderStyle>
</asp:datagrid>
</div>
</TD>

Here is my "gridFixedHeader" definition from my style sheet:
.gridFixedHeader
{
background-color:white;
position:relative;
top:expression(this.offsetParent.scrollTop);
}
Thanks in advance for any suggestions!

Rosanne
--
Rosanne
------------------------------------------------------------------------
Rosanne's Profile: http://www.highdots.com/forums/m283
View this thread: http://www.highdots.com/forums/t2843442


Hi Roseanne:

I have the same problem and it is confounding me. Please let me know if
you have found a solution.

Thanks,
Ron

Nov 19 '05 #2
On Fri, 23 Sep 2005 07:53:48 -0700, ron.tornambe wrote:
Rosanne wrote:
I have defined a datagrid. This datagrid has a fixed header and a
scrollable body. I have defined vertical gridlines in the datagrid
properties - I assumed these vertical lines would be in both the header
and the body of the grid. The problem is the vertical gridlines are
appearing in the body of the datagrid, but not in the header. I've
tried setting all different kinds of properties in the <headerstyle> to
get the vertical lines, but nothing works. I am sure I'm missing
something simple. Any ideas? Here is the datagrid html:

<TD vAlign="top">
<div style="OVERFLOW: auto; HEIGHT: 300px">
<asp:datagrid id="dgTimeTable" runat="server" BorderColor="Black"
BorderStyle="None" BackColor="White" cellPadding="3"
GridLines="Vertical" BorderWidth="1px" EnableViewState="False"
ItemStyle-HorizontalAlign="Right" ShowHeader="True">
<ItemStyle HorizontalAlign="Right"></ItemStyle>
<HeaderStyle Font-Bold="True" Wrap="False" HorizontalAlign="Center"
BorderWidth="1px" BorderColor="Black" CssClass="gridFixedHeader"
VerticalAlign="Bottom" BackColor="WhiteSmoke"></HeaderStyle>
</asp:datagrid>
</div>
</TD>

Here is my "gridFixedHeader" definition from my style sheet:
.gridFixedHeader
{
background-color:white;
position:relative;
top:expression(this.offsetParent.scrollTop);
}
Thanks in advance for any suggestions!

Rosanne
--
Rosanne
------------------------------------------------------------------------
Rosanne's Profile: http://www.highdots.com/forums/m283
View this thread: http://www.highdots.com/forums/t2843442


Hi Roseanne:

I have the same problem and it is confounding me. Please let me know if
you have found a solution.

Thanks,
Ron

I'd verify through looking at the browser's View Source that the
appropriate styles or attibutes are being set.
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
0
by: Stanley Alex | last post by:
I am having a problem with the way my DataGrid displays when a column header is clicked on to sort records. When the column name is clicked, a white background appears behind the column name. Also,...
0
by: Danny | last post by:
I am trying to sort my second datagrid. And it works but only after i click 2 times on the column header. The first time i click on the header the data in the right order will add to the rows in...
8
by: Alejandro Penate-Diaz | last post by:
I have a datagrid inside a table and I want to fix both (table and databrid) width to 700, but when the content of datagrid is too large the width increases automatically sometimes and sometimes...
0
by: Baren | last post by:
Hi! I have defined some style sheet for the DataGrid Header. It works fine in IE, But Netscape 6.2 doesn't display the DataGrid Properly. Its missing the Header Style. My style Sheet...
4
by: sakieboy | last post by:
I currently have a datagrid with several columns. The first column in the DataGrid is a HyperLinkColumn. When I select a row, I would like for this HyperlinkColumn to fire. I have the mouseover...
0
by: cedoucette | last post by:
I just wrote code to support sortable columns in a datagrid. It seems to work fine; but, it doesn't look right. The problem is that I have a generic style for links and a different style for the...
2
by: Stan Sainte-Rose | last post by:
Hello, I need to know how to format Integer and Real with the datagrid. In fact, I want to use the right alignment. When I use this option the header text comes with the right alignment too. :( ...
2
by: cj | last post by:
I was looking over some of my 2003 code today (see below) that loads a foxpro table via oledb connection. I used a sub "autosizecolumns" I found on the web but I never quite understood why they...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.