Error Panel Row Updating
<p>I want to show error panel on row updating but it does not show the error panel. What's wrong with this code?</p>

<pre><code>protected void Grades_GridView_RowUpdating(object sender, GridViewUpdateEventArgs e)
{  
    string LetterGrade = Grades_GridView.DataKeys[e.RowIndex].Values["Letter_Grade"].ToString();
    TextBox txtMinGrade = (TextBox)Grades_GridView.Rows[e.RowIndex].FindControl("txtMinGrade");
    TextBox txtMaxGrade = (TextBox)Grades_GridView.Rows[e.RowIndex].FindControl("txtMaxGrade");

    if (Convert.ToDecimal(txtMinGrade.Text) &gt; Convert.ToDecimal(txtMaxGrade.Text))
    {
        PanelError.Visible = true;
        LabelErrorString.Text = "Minimum grade must not be greater than maximum grade!";     
    }
    else
    {
        Admin.updateGradeRanges(LetterGrade, txtMinGrade.Text, txtMaxGrade.Text);
    }
    Grades_GridView.EditIndex = -1;
    FillGradeRangesInGrid();
}
</code></pre>
