Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Fixed Header on a Data Grid using CSS - problem with Drop downs

Thread Tools

Fixed Header on a Data Grid using CSS - problem with Drop downs

Posts: n/a
Hi Guys,
Hopefully some one will have come across this issue already. I have a
DataGrid inside a Div where a scroll bar displays once a certain height is

--> <div id="dvSales" style="height: 230px; overflow: auto; width: 100%"

The Data Grid has AllowPaging is set to False and the HeaderStyle tag is set
for the DataGrid so that the header remains fixed when we scroll using the
scroll bar.

--> <HeaderStyle CssClass="DataGridFixedHeader"></HeaderStyle>

Here is the style in the CSS for the fixed header
--> .DataGridFixedHeader
background-color: white;

This works fine for my Data Grid but only when the Grid has no drop downs as
part of it. If there is drop downs as part of the data grid then they do not
become transparent when we use the scroll bar. I read somewhere that this
has to do with the fact that a drop down in HTML is given higher priority
than other HTML controls when rendering. Anybody have any ideas on how to
Reply With Quote
Posts: n/a
This is one of IEs great blunders. I have struggled with this bug too
many times to count. The problem is that the DropDown in IE is a
windowed component and doesn't read the zindex assigned in the HTML.
If you notice it works fine in other browsers. One option would use
javascript and during scrolling hide all dropdowns within the div, then
do a hit count within your div to set the visibility flag based on
which are inside your clipped space. This looks good but is a
significant hit to the browser and is more javascript then most care to
write. You may want to try an IFrame, but then you have to deal with
the posting to different pages problem.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
1st Drop-down selection determins selected value in all drop-downs In ASP.Net Wizard jaysch ASP .Net 0 04-30-2011 02:19 PM
Drop Downs - dynamically populating from array based on previous data Javascript 0 05-16-2005 03:22 PM
dual drop downs =?Utf-8?B?TWlrZQ==?= ASP .Net 1 03-09-2005 08:23 PM
list of drop downs JohnZing ASP .Net 0 01-30-2005 07:09 PM
Need Script For Drop Downs Davmagic .Com Perl 0 10-14-2004 03:25 PM