Sounds like you need to handle a text changed event on the cell or the CellStateChanged event on the gridview.
I prefer the CellStateChanged as it does calculations after pressing enter (cell loses focus).
This assumes the name of the FinalGrade column is FinalGrade, not just the text.
private void CellChanged(object sender, DataGridViewCellStateChangedEventArgs e) {
if (e.Cell.OwningColumn.Name == "FinalGrade") {
if (null != e.Cell.Value) {
int score = 0;
if (int.TryParse(e.Cell.Value.ToString(), out score)) {
DataGridViewCell cell = dgv1.Rows[e.Cell.RowIndex].Cells["Remarks"];
if (null != cell) {
if (score >= 75) {
cell.Value = "Passed";
}
else {
cell.Value = "Failed";
}
}
}
}
}
}