I am trying to automatically update a table when a checkbox is clicked. The code below works, but only after the second time it is run. What am I doing wrong?
private void checkBox1_CheckedChanged(object sender, EventArgs e) { this.Plans_BindingSource.EndEdit(); DataRow dataRow = ((DataRowView)((BindingSource)this.Plans_BindingSource).Current).Row; if (dataRow != null) this.Plans_TableAdapter.Update(dataRow); }
Kipp Woodard