Protected void gv_GridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.DataItemIndex != 0)
{
foreach(GridViewRow row in gv_GridView.Rows)
{
if (e.Row.Cells[5].Text == row.Cells[5].Text)
{
e.Row.Cells[5].ForeColor = (e.Row.Cells[5].Text != row.Cells[5].Text) ? Color.Green : Color.Red;
MessageBox3.ShowError("You have entered the same person twice, please delete the second entry.");
}
}
}
}
}