Hey All,
I have a gridview and i have a button to print it...
there is it code
protected void Button6_Click(object sender, EventArgs e)
{
GridView1.Attributes["style"] = "border-collapse:separate";
GridView1.HeaderRow.Visible = false;
GridView1.Rows[2].Visible = false;
foreach (GridViewRow row in GridView1.Rows)
{
if (row.RowType == DataControlRowType.DataRow)
{
row.Cells[1].Visible = false;
}
}
StringWriter SW = new StringWriter();
HtmlTextWriter HW = new HtmlTextWriter(SW);
GridView1.RenderControl(HW);
string gridHTML = SW.ToString().Replace("\"", "'").Replace(System.Environment.NewLine, "");
StringBuilde ...
Go to the complete details ...