S
sonali
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.scrollTop-2) >
(this.offsetParent.offsetTop -
this.parentElement.parentElement.parentElement.firstChild.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>
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.scrollTop-2) >
(this.offsetParent.offsetTop -
this.parentElement.parentElement.parentElement.firstChild.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>