Pre render event in asp.net
<pre><code>protected void rgStateTax_PreRender( object sender, EventArgs e )
{
    if( rgStateTax.MasterTableView.IsItemInserted )
    {
        foreach( GridItem item in rgStateTax.Items )
        {
            item.Visible = false;
        }
    }

    if( rgStateTax.EditItems.Count &gt; 0 )
    {
        foreach( GridDataItem item in rgStateTax.Items )
        {
            if( item != rgStateTax.EditItems[0] )
            {
                item.Visible = false;
            }
        }
    }
}
</code></pre>

<p>Here, rgStateTax is a Rad grid control. Is there any reason for marking the items as invisible? PreRender is the event before the page is actually displayed on the screen, right?. </p>
