tab page validating

lroggow

New member
Joined
Dec 15, 2006
Messages
1
Programming Experience
1-3
During my tab page's validating event I have code like this:

VB.NET:
Private Sub ClientsPage_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) _
Handles ClientsPage.Validating
 
Dim bDataChanged As Boolean
bDataChanged = ClientCheckForChanges()
If bDataChanged = True Then
If MsgBox("You have unsaved changes. Do you really want to leave this page?", MsgBoxStyle.YesNo) = _
MsgBoxResult.No Then
e.Cancel = True
End If
End If
End Sub
If there are unsaved changes and the user selects no to cancel, I return to the clients page on the form, which is good, but the command buttons and radio buttons on the page no longer respond to button clicks. I set a breakpoint in the click event of one of the buttons, and it never fires. I can however, type in the text boxes and make selections in the combo boxes.
Why are the buttons not working, and what can I do to fix this?
Thanks for any input.
 
Last edited by a moderator:
Back
Top