void gcMultiRow1_CancelRowEdit(object sender, QuestionEventArgs e)
{
int currentRowIndex = gcMultiRow1.CurrentCellPosition.RowIndex;
// Cancel uncommitted new row.
if (currentRowIndex >= 0 && currentRowIndex < gcMultiRow1.RowCount - 1)
{
// Cancel row level edit.
userData[currentRowIndex] = new Student(restoreRow.ID, restoreRow.Name, restoreRow.MathematicsScore, restoreRow.PhilosophyScore);
}
}
Private Sub gcMultiRow1_CancelRowEdit(ByVal sender As Object, ByVal e As QuestionEventArgs) Handles gcMultiRow1.CancelRowEdit
Dim currentRowIndex As Integer = gcMultiRow1.CurrentCellPosition.RowIndex
' Cancel uncommitted new row.
If currentRowIndex >= 0 AndAlso currentRowIndex < gcMultiRow1.RowCount - 1 Then
' Cancel row level edit.
userData(currentRowIndex) = New Student(restoreRow.ID, restoreRow.Name, restoreRow.MathematicsScore, restoreRow.PhilosophyScore)
End If
End Sub