B
Brice
From David Sceppa's "Programming MS ADO.NET 2.0", Chapter 13, Step 9,
He is binding a second form to a Binding Source that is being passed
as a parameter. However, he is performing all Data Bindings for the
second form, manually in code. Is there an easier way?
For example, I have created a new form. From the "Data Sources" tab,
I select and drag a data source onto my form, which automatically
generates a Details View for me. This also creates a Dataset and a
BindingSource. In the EditDetail method, I set this BindingSource
equal to the one that is passed in as a parameter. However, the form
is not displaying the current record, all text boxes are empty. The
code listed below is an example of what I'm doing.
What step am I missing here?
THANKS!!
public void EditDetail(BindingSource pBindingSource) {
this.localBindingSource = pBindingSource;
if (this.ShowDialog() == DialogResult.OK)
this.localBindingSource.EndEdit();
else
this.localBindingSource.CancelEdit();
He is binding a second form to a Binding Source that is being passed
as a parameter. However, he is performing all Data Bindings for the
second form, manually in code. Is there an easier way?
For example, I have created a new form. From the "Data Sources" tab,
I select and drag a data source onto my form, which automatically
generates a Details View for me. This also creates a Dataset and a
BindingSource. In the EditDetail method, I set this BindingSource
equal to the one that is passed in as a parameter. However, the form
is not displaying the current record, all text boxes are empty. The
code listed below is an example of what I'm doing.
What step am I missing here?
THANKS!!
public void EditDetail(BindingSource pBindingSource) {
this.localBindingSource = pBindingSource;
if (this.ShowDialog() == DialogResult.OK)
this.localBindingSource.EndEdit();
else
this.localBindingSource.CancelEdit();