title: header position of the grid not fixed while printing,
body: <p>there is a grid that populates data,</p>
  
  <pre><code>&lt;asp:Panel ID="Panel1" runat="server" ScrollBars="Auto" Width="1000px" 
    Height="8000px" BorderColor="Black" BorderWidth="1px" Visible="true" BackColor="LightGray"&gt;
  &lt;asp:GridView ID="List" runat="server" Visible="False" OnRowDataBound="List_RowDataBound" AutoGenerateColumns="true"&gt;
  
        &lt;HeaderStyle CssClass="gridstyleHead" /&gt;
        &lt;RowStyle CssClass="gridRowstyle" /&gt;
  
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>and there is a style sheet that applies to grid </p>
  
  <pre><code>.gridstyleHead {
  white-space: nowrap;
  text-align: left;
  font-family: Arial;
  font-size: 10pt;
  font-weight: lighter;
  padding-left: 3px;
  position: relative;
  top: expression(this.offsetParent.scrollTop);
  z-index: 10;
  }
  
  .gridRowstyle {
  white-space: nowrap;
  border-width: 1px;
  background-color: white;
  font-family: Arial;
  font-size: 9pt;
  height: 29px;
  </code></pre>
  
  <p>}</p>
  
  <p>i am trying to print the data that is in grid</p>
  
  <pre><code>function btnPrint_Click() {
  varfoo="toolbar=yes,location=no,directories=yes,menubar=yes,scrollbars=yes,
  width=500,height=600,left=50,top=25";
  
  
    varprintdata=document.getElementById('&lt;%=Panel1.ClientID%&gt;').innerHTML;
          var printWindow = window.open('', 'PRINT', foo);
          var radioButtons = document.getElementsByName("ordrcvd");
          var ord = '';
          for (var x = 0; x &lt; radioButtons.length; x++) {
              if (radioButtons[x].checked) {
                  ord = radioButtons[x].value;
              }
          }
          printWindow.document.write('&lt;html&gt;&lt;head&gt;&lt;link rel="stylesheet" href="css/invoice.css" /&gt;');
          printWindow.document.write(' &lt;/head&gt;&lt;body&gt;');
          printWindow.document.write('&lt;table&gt;');
          printWindow.document.write('&lt;tr&gt;&lt;td style = "font-weight:bold;font-family:arial;font-size:12"&gt; order Received' + '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  : ');
          printWindow.document.write('&lt;/td&gt;&lt;td style = "font-weight:normal;font-family:arial;font-size:12"&gt;');
          printWindow.document.write(document.getElementById('&lt;%= txtordRcvd.ClientID%&gt;').value);
          printWindow.document.write('&lt;/td&gt;&lt;/tr&gt;');
          printWindow.document.write('&lt;tr&gt;&lt;td&gt; &lt;/br&gt;');
          printWindow.document.write('&lt;/td&gt;&lt;/tr&gt;');
          printWindow.document.write(' &lt;/table&gt;');
          printWindow.document.write(printContent);
          printWindow.document.write('&lt;/body&gt;&lt;/html&gt;');
          printWindow.document.close();
          printWindow.focus();
  
          return false;
      }
  </code></pre>
  
  <p>but the problem is header in the grid is not fixed and 
  the one am printing is showing the grid with header not fixed.</p>
  
  <p>Header in the grid being not fixed is fine but when am trying to print that grid and scroll down, the header position is misplaced.</p>
  
  <p>can anyone suggest how to apply stylesheet for the grid that am printing, so that header will be fixed </p>
  
  <p>Thanks in advance,</p>