Gridview hearder fix

A

Arun

Hi

Please help me in this confusing issue
I have placed a gridview inside a panel.see below

<asp:panel ID="PnlChildMeasures" runat="server"
HorizontalAlign="Center" meta:resourcekey="PnlChildMeasuresResource1"
ScrollBars="Auto" Width="99%"
Height="300px" Visible="false">
<asp:GridView ID="grdChildMeasures"
runat="server"
AutoGenerateColumns="False"
CssClass="GridView"
EmptyDataText="--No Data--"
meta:resourcekey="grdChildMeasuresResource1" Width="97%"
SelectedRowStyle-CssClass="SelRow"
AlternatingRowStyle-CssClass="GridItemAlt"
RowStyle-CssClass="GridItem"

DataKeyNames="CHILD_ID,TEMP_MEASURE_ID,DATE_MEASUREMENT"
><%--SkinID="grdChildMeasures"--%>
<Columns>
<asp:BoundField
DataField="CHILD_NUMBER_PARTNER" HeaderText="Child Number"
meta:resourcekey="BoundFieldResource1">
<HeaderStyle Width="20%"
CssClass="GridViewHeader" />
</asp:BoundField>
</Columns>
</asp:GridView>
</asp:panel>


Also CSS for gridview Headerstyle is

..GridViewHeader
{
height: 20px;
border-style: none;
color: #FFFFFF;
font-weight: bold;
background-color: #DB7044;
background-repeat: repeat-y;
background-position: right;
background-attachment: fixed;
position: relative;
top: expression(this.offsetParent.scrollTop-1.0);
text-align: left;
padding-left: 2px;
}

top: expression is given bt its not working

Header is fixing inside the panel but when i scroll the page its not
fixing, during page scroll the header is not fixing and its moving
away from gridview header and misplaced some where else.

Please give a solution to it. I have searched a lot for a solution but
not getting a correct way to fix the issue.
Its very urgent for my application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top