내가 셀을 클릭하면 내가 Yes
을 클릭 프로그램이 현재 값을 확인하고 그것을 뭔가를 업데이트 할 경우 MSGBOX 먼저 sayon Are you you want to update changes?
표시됩니다 셀 (checkboxcolumn)
을 클릭합니다 말할 수 있습니다 이.
If value = yes then
value = No
elseif value = no then
value = Yes
end if
와 나는 MSGBOX에 NO
을 선택하면 현재 셀의 의지의 값은 동일하게 유지됩니다.
여기 내 코드 내 질문은
If (e.ColumnIndex = 1 AndAlso e.RowIndex >= 0) Then
Dim value = DirectCast(DataGridView1(e.ColumnIndex, e.RowIndex).FormattedValue, Nullable(Of Boolean))
Dim result = MessageBox.Show("Are you sure to uncheck item?", "", MessageBoxButtons.YesNoCancel)
If (value.HasValue AndAlso value = True) Then
If (result = System.Windows.Forms.DialogResult.Yes) Then
If DataGridView1(e.ColumnIndex, e.RowIndex).Value = True Then
DataGridView1(e.ColumnIndex, e.RowIndex).Value = False
Else
DataGridView1(e.ColumnIndex, e.RowIndex).Value = True
End If
ElseIf (result = System.Windows.Forms.DialogResult.No) Then
End If
Else
End If
End If
입니다.
messagebox에서 Yes를 클릭하면 어떻게 셀의 값을 확인하고 반대로 바꿀 수 있습니까? 메시지 상자에서 NO를 클릭하면 값이 그대로 유지되거나 원래 값으로 돌아갑니다.
나는 위의 내 코드를 시도하지만 작동하지 보이는
TYSM 당신은 같은 기준을 사용할 수 있습니다
확인 여부를 확인하기 전에 언 체킹을 원하는지 묻습니다. 사용자를 싫어해야합니다. – Plutonix
진심으로 선생님, 나는 그들을 정말로 싫어합니다. 제발 저를 도와주세요. –
* what *? 당신은 질문을하지 않았고 게시물의 텍스트가 코드와 일치하지 않습니다. – Plutonix