Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Scrollable Grid With Fixed Header (Please Help Its Urgent)

Reply
Thread Tools

Scrollable Grid With Fixed Header (Please Help Its Urgent)

 
 
sonali
Guest
Posts: n/a
 
      08-16-2006
I Have A Grid With Drop Down List As Template Column
In Scrolling There Is some Problem

Code Is As Follows:

<style type="text/css">
.gridFixedHeader
{
background-color:white;
position:relative;
top:expression(GridView1.offsetParent.scrollTop-2);
}

.dropdownFix
{
behavior:expression(this.style.visibility =
(this.offsetParent.offsetParent.offsetParent.scrol lTop-2) >
(this.offsetParent.offsetTop -
this.parentElement.parentElement.parentElement.fir stChild.offsetHeight+2)
? 'hidden' : 'visible');
}


</style>
</head>
<body>
<form id="form1" runat="server">


<table id="TABLE1" runat="server" >
<tr>
<td style="height: 21px">
<div style=" height: 184px; OVERFLOW: auto; ">
<asp:GridView ID="GridView1" runat="server"
HeaderStyle-CssClass="gridFixedHeader " >
<Columns>
<asp:TemplateField HeaderText="dropdown" >
<ItemTemplate>
<aspropDownList ID="DropDownList1"
runat="server" CssClass="dropdownFix">
</aspropDownList>
</ItemTemplate>

</asp:TemplateField>
<asp:TemplateField HeaderText="proj id">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("proj_id") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("proj_id") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="dfxgvfxc">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server"
/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="gridFixedHeader"
BorderColor="Black" />
</asp:GridView>
</div>
</td>

</tr>

</table>

 
Reply With Quote
 
 
 
 
eliza81 eliza81 is offline
Junior Member
Join Date: Feb 2010
Posts: 13
 
      03-08-2010
One workaround is to have a separate table control to show the header elements and hide the actual header of the grid.Now put the grid inside a div or panel with scrollbar property.But that takes extra effort to have a proper alignment.Each cell of the header table should be aligned with each cell of the grid.The other work around is to fix the header of the grid in such a way that scrolling down shouldnt hide the header of the grid.Using we can achieve that.
 
Reply With Quote
 
 
 
Reply

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
Scrollable Table with Fixed Headers Mel Smith HTML 27 06-09-2010 10:29 PM
Position fixed and scrollable DIV Marcus HTML 0 10-06-2008 10:11 AM
Scrollable grid with locked header/left columns? Cristof Falk ASP .Net 1 05-13-2005 08:00 AM
Scrollable table widget with fixed header Mel Javascript 2 07-10-2004 04:34 PM
Scrollable Datagrid w/ fixed headers AND sorting? Stephen P. ASP .Net Datagrid Control 0 06-24-2004 03:48 PM



Advertisments