c# - Header printing on every page -


I have a gridview that I want to print its header on every page and I have a page header I want to print. The problem is that one or the other works for me. I can not get both to work at the same time. I have a sample code to show what I did below.

  & lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Body onload = "thead ('tblheader');" & Gt; & Lt; Table id = "tblheader" & gt; & Lt; Tr id = "title" & gt; & Lt; Td> Page header & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Body & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Body onload = "AddTHEAD ('Claim Grid');" & Gt; & Lt; Gridview id = "claimGrid" & gt; & Lt; / GridView & gt; & Lt; / Body & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;  

Javascript functions are called - I know that both are accurate, I could just send the name of the table, but I had another code before the second function .

function AddTHEAD (tagname) {var table = $ received ('<% = claimGrid.ClientID% & gt;'); If (table! = Null) {var head = document.createElement ("THEAD"); Head.style.display = "table-haider-group"; Head.appendChild (table.rows [0]); Table.insertBefore (head, table.childNodes [0]); }} Function thead (tableName) {var table = document.getElementById ('tblheader'); If (table! = Null) {var head = document.createElement ("THEAD"); Head.style.display = "table-haider-group"; Head.appendChild (table.rows [0]); Table.insertBefore (head, table.childNodes [0]); }}

CSS class

  & style; Style = "text / css" & gt; @ Media Print {th {color: black; Background color: white; } THead {display: table-header-group; }} & Lt; / Style & gt;  

Am I doing wrong? If you need more information ... just ask

remove double body tag Given and called a function, then first calls the other inside the function.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -