Hi James,
You can use the UserAddingRow to check if both values are selected (assuming that all already added rows have valid values):
If the above code is used and only one value is selected the user can press Esc to remove the focus from the new row and go to the already added rows. In this case, it does not matter which key you are using to add the new row.
I hope this will be useful.
Regards,
Dimitar
Telerik by Progress
You can use the UserAddingRow to check if both values are selected (assuming that all already added rows have valid values):
Private
Sub
RadGridView1_UserAddingRow(
ByVal
sender
As
Object
,
ByVal
e
As
GridViewRowCancelEventArgs)
Dim
row = TryCast(e.Rows(0), GridViewNewRowInfo)
If
row.Cells(
"Employee"
).Value IsNot
Nothing
AndAlso
row.Cells(
"PayCode"
).Value IsNot
Nothing
Then
Return
End
If
e.Cancel =
True
MessageBox.Show(
"All values must be filled"
)
End
Sub
If the above code is used and only one value is selected the user can press Esc to remove the focus from the new row and go to the already added rows. In this case, it does not matter which key you are using to add the new row.
Regards,
Dimitar
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.