Hi,
I'm using the code below to disable controls if user clicks Yes after deselecting a row, problem is if they select NO, the row deselected remains deselected, ist here a way to automatically reselect the row deselected when the user presses No?
The code is in the lostfocus event of my C1TrueDBGrid control or should the code be placed in another section?
If countrepeatedchar("0,1,2,3,4", "4") >= 1 And C1MunitionType.SelectedRows.Count = 1 Then
va = 1
C1OMT.Enabled = True
LO.BackColor = Color.Yellow
C1ImageA.Text = ""
Else
If C1OMT.Text <> "" Then
Dim anadd As String = Nothing
anadd = MsgBox("Related information (OMT) on screen 4 for will also be deleted are you sure you want to deselect?", MsgBoxStyle.YesNo, "Warning before Attempting deselect Item")
If anadd = MsgBoxResult.Yes Then
C1OMT.Enabled = False
LO.BackColor = Color.LightGray
C1OMT.Text = ""
End If
End If
End If
Thanks,
Victor
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.