I'm putting together a simple self-quizing application that uses a strongly typed dataset as it's data storage mechanism. The application currently consists of just a form that creates/loads the DataSet and displays the information in the dataset using a Master-Detail arangement.
Everything works fine with my test dataset for browsing through the records. Both the Master fields and the detail datagrid update and stay in sync as I page through the records. However as soon as I click my "New Question" button the link between the master and detail records seems to be broken (i.e. paging through the questions no longer updates the answers grid)
Here is the XML Schema that defines my DataSet:
<TestSource>
<Question id="someguid" NumCorrectAnswers="1">
<QuestionText>Some text....</QuestionText>
<Answers>
<Answer id="someguid" Correct="true">
<AnswerText>Some text....</AnswerText>
</Answer>
</Answers>
</Question>
</TestSource>
In the constructor for my form I have the following code:
QuestionText.DataBindings.Add("Text", _TestDataSource, "Question.QuestionText");
NumberOfCorrectAnswers.DataBindings.Add("Text", _TestDataSource, "Question.NumberOfAnswers");
AnswersGrid.DataBindings.Add("DataSource", _TestDataSource, "Question.Question_Answers.Answers_Answer");
In the paging controls I have the following line of code:
this.BindingContext[_TestDataSource, "Question"].EndCurrentEdit();
And finally in the click event of the New button I have the following code:
this.BindingContext[_TestDataSource, "Question"].AddNew();
((DataRowView)this.BindingContext[_TestDataSource, "Question"].Current)["QuestionID"] = Guid.NewGuid().ToString();
QuestionText.Focus();
Any thoughts on why the DataGrid stops updating after I click the New Button The new record is being created when the button is click and I am able to save the DataSet out to an XML file with the new record in it.
Thanks in advance,
Shawn.

Detail View does not update after calling AddNew() on the master record
IrishAnto
You would do this
me.bindingcontext(datagrid1.datasource,datagrid1.datamember).addnew()
then
ctype(me.bindingcontext(datagrid1.datasource,datagrid1.datamember).current,datarowview).item("ID") = guid.newguid.tostring
Hope this helps