views:

32

answers:

1

Hi,

I am building an occasionally-connected WinForms application and have been following link text tutorial.

When using a datasheet to edit data, as the tutorial has me do, everything works fine. If, however, I bind the data to other controls on my form, the data is not saved.

For example, I am tracking StaffID, FName, and LName. At the top of the form, I have the datasheet with these three fields. Everything works fine after I update the data and click my save button.

private void radButton1_Click(object sender, EventArgs e)
{
    this.Validate();
    this.myBindingSource.EndEdit();
    this.tableAdapterManager.UpdateAll(this.myDataSet);
}

Now, at the bottom of my form, I have three text boxes for my fields. After editing the data in these controls and clicking the save button, nothing happens. While, the controls all retain the updated data, the changes never make it to myDataSet and the info reverts back when I reload the application.

In this example, both the datasheet and my other controls are all bound to myBindingSource.

Any ideas what I might be doing wrong and ways to remedy this would be greatly appreciated!

A: 

Not really enough info here to answer properly, but I would start by making a manual call to your SyncAgents Synchronize method immeadiatley after updating the data to disk. Another common thing forgotten is to make sure that the sync direction is set to Bidirectional otherwise Server data will overwrite Client data.

Sorry its rather vauge, If you can post more detail, I can help further.

JohnnyJP