Monday, 28 October 2013

CSS - To fix Gridview Header Position

Following CSS can be used to fix the header position in gridview

  background-color: #006699;
  position:relative ;
  height: 25px;
  z-index: 10;

MainContent_dvGrid  - is  div which contain the GridView.
y- 270 => 270 value can be adjusted as per your requirement and alignment of Grid & Div.

Use this CSS in HeaderStyle of your Grid,
 <HeaderStyle CssClass="fixedHeader" ForeColor="White" Height="10px" />