how to hide columns in ASP.NET webform
<p>In my PrinterPackage.<b>aspx</b> file i have the following <b>'User Control'</b>:</p>

<pre><code>&lt;%@ Register Src="~/ProvisionControls/DeferredTaxRollforwardControl.ascx" TagPrefix="uc9" TagName="DeferredTaxesRollforwardControl" %&gt; 
   ...
   ...
 &lt;div&gt;
    &lt;uc9:DeferredTaxesRollforwardControl ID="DeferredTaxesRollforwardControl1" runat="server" /&gt;
 &lt;/div&gt;
</code></pre>

<p>which calls the control file 'DeferredTaxRollforwardControl.<B>ascx</b>' that contains my table defined as follows:</p>

<pre><code>&lt;table style="width: 4600px; border-spacing:0px;" border="0" frame="hsides" cellpadding="2" cellspacing="1"&gt;

&lt;tr id = "tblTempDiff"&gt; //want to import this


&lt;td style="width:7.6%;" width="2px;" class="paintYellowTotalLeftBold"&gt;
    Grand Total Current
&lt;/td&gt;
&lt;td style="width:2.8%;" width="2px;" class="paintYellowTotalBold"&gt;
    &lt;asp:Label ID="lblGrandTotalUnadjustedBeginningBalance" runat="server" Text=""&gt;&lt;/asp:Label&gt;
&lt;/td&gt;
... and more &lt;td&gt;
</code></pre>

<p>I am trying to display the table and also hide some of the columns using the following code in my PrinterPackage.<b>aspx.cs</b> file :</p>

<pre><code> TableRow row = DeferredTaxesRollforwardControl1.FindControl("tblTempDiff") as TableRow;
        row.Cells[0].Visible = true;
        row.Cells[1].Visible = true;
        row.Cells[2].Visible = true;
        row.Cells[3].Visible = true;
        row.Cells[4].Visible = true;
        row.Cells[5].Visible = true;
        row.Cells[6].Visible = true;
        row.Cells[7].Visible = true;
        row.Cells[8].Visible = true;
        row.Cells[9].Visible = false;
        row.Cells[10].Visible = false;
        row.Cells[11].Visible = false;
        row.Cells[12].Visible = false;
</code></pre>

<p>But, this doesn't seem to pick up the table row <b>tblTempDiff</b> and gives me a null value instead. How can i import the data from the TableRow <b>tblTempDiff</b> into <b>row</b> and then hide whatever columns i want to hide?</p>

<p><b>Please ask me questions if you need more information, as i know i am not the best person when it comes to explaining my questions.</b></p>
