void gcMultiRow1_CellValuePushed(object sender, CellValueEventArgs e)
{
// When user edit value, MultiRow control will notify update your data by this event.
Student student = userData[e.RowIndex];
if (e.CellName == "Name")
{
student.Name = e.Value.ToString();
}
else
{
int value;
if (!int.TryParse(e.Value.ToString(), out value))
{
MessageBox.Show("Score should be a number");
return;
}
if (e.CellName == "Mathematics")
{
student.MathematicsScore = value;
}
else if (e.CellName == "Philosophy")
{
student.PhilosophyScore = value;
}
}
}
Private Sub gcMultiRow1_CellValuePushed(ByVal sender As Object, ByVal e As CellValueEventArgs) Handles gcMultiRow1.CellValuePushed
' When user edit value, MultiRow control will notify update your data by this event.
Dim student As Student = userData(e.RowIndex)
If e.CellName = "Name" Then
student.Name = e.Value.ToString()
Else
Dim value As Integer
If Not Integer.TryParse(e.Value.ToString(), value) Then
MessageBox.Show("Score should be a number")
Return
End If
If e.CellName = "Mathematics" Then
student.MathematicsScore = value
ElseIf e.CellName = "Philosophy" Then
student.PhilosophyScore = value
End If
End If
End Sub