Clearing NumericUpDown

前端 未结 3 1193
别那么骄傲
别那么骄傲 2021-01-29 12:39

My problem with NumericUpDown control is when the user selects a value from NumericUpDown And unchecks the checkBox1 and clicks the Save button, the value of NumericUpDown not c

3条回答
  •  借酒劲吻你
    2021-01-29 13:20

    Access the text control of the NumericUpDown and then set text to be blank

    Private Sub CheckBox1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox1.CheckedChanged
    
        If CheckBox1.Checked = False Then
            AgeNumericUpDown.Controls.Item(1).Text = ""
        End If
    
    End Sub
    

    enter image description here

提交回复
热议问题