|
Often we will have a requirement like printing the Grid header in every page when it's printed out. You can do this using Javascript, by just changing the Grid Header row style to "display:table-header-group" just give the below code in your page script section function print_header() { var table = document.getElementById("dataGrid1"); // the id of your DataGrid var str = table.outerHTML; //replace the starting TBODY tag to empty string //replace the grid first row (header) tag with the Table Header details str = str.replace("<TR", "<THEAD style='display:table-header-group'><TR"); //replace the closing tag of the First Row (header) with the closing tag of the THEAD tag str = str.replace("</TR>", "</TR></THEAD><TBODY>"); table.outerHTML = str; Call this function once you have generated the grid.
| ||||||||||||||||||||||