title: Colspan gridview expand more columns after clicking print button
body: <p>I have the below grid-view has 4 columns.</p>
  
  <p>I have merged some columns in the footer.</p>
  
  <p>The issue i am having after clicking <code>printbtn</code> the grid-view adds tow additional columns to the in the footer.</p>
  
  <p>So the out put will be the original grid-view columns plus 2 empty columns in the grid-view footer.</p>
  
  <p><strong>Grid-View</strong></p>
  
  <pre><code>&lt;asp:GridView ID="grid" runat="server" ShowFooter="true" DataSourceID="SqlDs_Grid" OnRowDataBound="grid_RowDataBound" AutoGenerateColumns="false" CssClass="table"&gt;
  &lt;Columns&gt;
      &lt;asp:BoundField HeaderText="Sr.No"&gt;&lt;/asp:BoundField&gt;
      &lt;asp:BoundField DataField="ProductName" HeaderText="Item Description" SortExpression="ProductName"&gt;&lt;/asp:BoundField&gt;
      &lt;asp:BoundField DataField="ProductQty" HeaderText="Quantity" SortExpression="ProductQty"&gt;&lt;/asp:BoundField&gt;
      &lt;asp:BoundField DataField="UnitPrice" HeaderText="Unit Price"&gt;&lt;/asp:BoundField&gt;
      &lt;asp:BoundField HeaderText="Total Amount" /&gt;
  &lt;/Columns&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Behind-Code</strong></p>
  
  <pre><code>protected void grid_RowDataBound(object sender, GridViewRowEventArgs e)
  {
  
          if (e.Row.RowType == DataControlRowType.Footer)
          {
              e.Row.Cells.RemoveAt(1);
              e.Row.Cells.RemoveAt(2);
              e.Row.Cells[0].ColumnSpan = 3;
              e.Row.Cells[0].Text = "&lt;div class='pull-left'&gt;Total Amount In  Words &lt;/div&gt; &lt;br&gt;" + "&lt;div class='pull-left'&gt;" + NumberToWords(Convert.ToInt32(Totalamount)) + "Only&lt;/div&gt;";
              e.Row.Cells[1].Text = "Total Amount:";
              e.Row.Cells[2].Text = Totalamount.ToString();
          }
  }
  </code></pre>
  
  <p><strong>Print Button</strong></p>
  
  <pre><code>&lt;asp:Button ID="printbtn" runat="server" Text="Print" CssClass="btn btn-primary hidden-print" OnClientClick="javascript:window.print();" /&gt;
  </code></pre>