I have form1 that has customer information textboxes that are databound to CustomerItem. If have a button on form1 for a test that works fine to retrieve the data that is displayed properly in the textoxes:
I have a search form that passes back a selected intKey to the same form1 to an almost identical routine. The CustomerItem object accurately shows the fields in debug mode (when inserting a breakpoint), but the same textboxes do not display the data when the routine is finished:
Any idea what I am doing wrong?
Thanks in advance,
HLeyes
private void btnRead_Click(object sender, EventArgs e) { int intKey = 11000; this.Cursor = Cursors.WaitCursor; CustomerItem = da.Read(intKey); customerItemBindingSource.DataSource = CustomerItem; txtCustomerKey.Focus(); this.Cursor = Cursors.Default; }
I have a search form that passes back a selected intKey to the same form1 to an almost identical routine. The CustomerItem object accurately shows the fields in debug mode (when inserting a breakpoint), but the same textboxes do not display the data when the routine is finished:
public void ReadData(int intKey) { this.Cursor = Cursors.WaitCursor; CustomerItem = da.Read(intKey); //I can see the data in CustomerItem here when hovering the cursor. customerItemBindingSource.DataSource = CustomerItem; txtCustomerKey.Focus(); this.Cursor = Cursors.Default; }
Any idea what I am doing wrong?
Thanks in advance,
HLeyes
Last edited by a moderator: