Posting the current row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been trying to follow the Building an N-Tier Application in .NET
Technical Article that Paul Sheriff wrote. I am having trouble, however,
with one particular aspect and I was wondering if you could help me.

The problem centers around bound controls on the Client application. If you
place a TextEdit box and bind it using the DataBindings.Add method:
edtFirstName.DataBindings.Add(new Binding(“Textâ€, mdsEmps,
“Employees.FirstNameâ€) this is C-Sharp code, by the way.

Now, as I type in the edtFirstName control and I click on the Update button,
the if mdsEmps.HasChanges fails. If, however, I click on the next row of the
datagrid, moving the record pointer, then I click on Update, then the test
succeeeds.

In other languages, the moving of the record pointer automatically performs
a Post on the dataset. Is there a command like this in .NET? If so, I have
not been able to find one. The row state remains unchanged until you move
off of it.

I am also wondering if I need to put the row into Edit mode somehow. I
appreciate any help you can give in this matter.
 
I have this exact problem also. Changing the focus away from the control
does not help. You have to change records. I execute . . .

Me.BindingContext(dsClients, "tblClient").EndCurrentEdit()

and still get the failure. Yet GetChanges works.

My problems is I have a from that only displays one record at a time so
there is no other record to move to and since "EndCurrentEdit" doesn't work I
am stuck.

Any addtional insights would be appreciated.

WR
 
Back
Top