Senthil Nathan

Senthil Nathan

  • 1.4k
  • 34
  • 50.3k

To keep the Grid view Header Fixed

Mar 6 2013 3:33 AM
HI all,

These are the Sample codes .........Here i need to keep the Gridview header Fixed while vertical Scorlling.


<asp:Panel ID="Panel1" runat="server"  Width="100%"  height="440px" ScrollBars ="Both">
<asp:GridView ID="GridView1" runat="server"  Width="150%" AutoGenerateColumns="False" 
CssClass="style2"  
onrowdatabound="GridView1_RowDataBound"   
                            ForeColor="#333333" >
                       <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            // 14  Asp Template Fields..................
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" CssClass="Freezing"   Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                   </asp:Panel>

Answers (9)