Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Scrollable Grid With Fixed Header (Please Help Its Urgent) (http://www.velocityreviews.com/forums/t364628-scrollable-grid-with-fixed-header-please-help-its-urgent.html)

sonali 08-16-2006 11:36 AM

Scrollable Grid With Fixed Header (Please Help Its Urgent)
 
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>
<asp:DropDownList ID="DropDownList1"
runat="server" CssClass="dropdownFix">
</asp:DropDownList>
</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>


eliza81 03-08-2010 12:06 PM

One workaround is to have a separate table control to show the header elements and h
 
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.


All times are GMT. The time now is 09:21 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.