ASP.net problem with changing table row visibility
<p>i have a table array dynamically generated from a data query and stored in a session variable. Now i wanna add a textbox to limit how many rows at a time i will display. To test this, i wrote two button methods, one will set some rows to be visible = false, and the second button method will set the same rows back to visible = true.</p>

<pre><code>protected void limit_btn_Click(object sender, EventArgs e)
{
    for (int i = 0; i &lt; traceTables.Length; i++)
        for (int j = 2; j &lt; traceTables[i].Rows.Count; j++)
            traceTables[i].Rows[j].Visible = false;

    Session["Tables"] = traceTables;
    table_C();
}//end limit_btn_Click()

protected void obo_btn_Click(object sender, EventArgs e)
{
    for (int i = 0; i &lt; traceTables.Length; i++)
        for (int j = 2; j &lt; traceTables[i].Rows.Count; j++)
            traceTables[i].Rows[j].Visible = true;

    Session["Tables"] = traceTables;
    table_C();
}//end obo_btn_Click()

protected void table_C()
{
    String changeTo = log_locations.SelectedValue;
    for (int i = 0; i &lt; sshLoc.Length; i++)
    {
        if (sshLoc[i].CompareTo(changeTo) == 0)
        {
            table_panel.ContentTemplateContainer.Controls.Remove(traceTables[currentTable]);
            System.Diagnostics.Debug.WriteLine("Removing " + sshLoc[currentTable]);
            table_panel.ContentTemplateContainer.Controls.Add(traceTables[i]);
            System.Diagnostics.Debug.WriteLine("Adding " + sshLoc[i]);
            currentTable = i;
            Session["CurrentTable"] = currentTable;
            break;
        }//end if
    }//end for
}//end table_C()
</code></pre>

<p>table_C() basically removes and adds the table from the panel - i use it when i want to switch between tables from a dropdown list (which works) and in this case it simply removes and adds the same table from the panel content container.</p>

<p>The problem is that setting the rows to be not visible works fine. Setting the rows back to visible never does, and i'm not sure why</p>
