private void textBox_TextChanged(object sender, EventArgs e) { if (textBox.Text == "") { _value = NullValue; } Subform.UpdateFromText(textBox.Text); OnValueChanged(); }
void CtrlDropdownHostList_Leave(object sender, EventArgs e) { if (Subform != null && this.IsSelectionList == false && this.dataGridView == null) { if (this.Value != null) { Subform.UpdateFromText(this.Value.ToString()); } if (this.Value == null && emptyTextOnNullValue) { textBox.Text = string.Empty; } } }