User-691209617 posted
Use below sample code,
<head runat="server">
<style>
@media print
{
input
{
display: none;
}
}
</style>
</head>
And add below code after bind data to Gridview
GridView1.UseAccessibleHeader = true;
GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;
dd below sample code on GridView1_RowDataBound event.
if (e.Row.RowType == DataControlRowType.DataRow)
{
tempcounter = tempcounter + 1 ;
if (tempcounter == 10)
{
e.Row.Attributes.Add("style", "page-break-after: always;");
tempcounter = 0;
}
}