Yes, PreRender is called before the control for the page is displayed.
This piece of code simply iterates over almost every element in the grid and makes it invisible.
if( rgStateTax.MasterTableView.IsItemInserted ) This checks if the element has been inserted into the grid.
foreach( GridItem item in rgStateTax.Items ) This goes through each element in the radgrid.
item.Visible = false; This means that every element is invisible.
Regarding the next part:
if( rgStateTax.EditItems.Count > 0 )
, .
foreach( GridDataItem item in rgStateTax.Items ) radgrid ( , ).
if( item != rgStateTax.EditItems[0] ) , ( , .
item.Visible = false; , .
, .