Hi jpdev4,
We need to call the EndEdit method of the BindingSource after we change the text of the TextBox programmatically. This is the modified code:
private void cbDefaultEmail_CheckedChanged(object sender, EventArgs e)
{
if (cbDefaultEmail.Checked)
{
emailTextBox.Text = "defaultEmail@address.net";
}
else
{
emailTextBox.Text = string.Empty;
}
//Notify the binding source that it needs to be updated
attorneyBindingSource.EndEdit();
}
Let me know if this helps.
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.