Hi,
I searched this forum but not found a answer to fit my needs. The problem is: I have 2 forms and one dataset on the parent form who fill a DataGridView. I've passed the dataset to the child form (through a constructor), but now I need the data to be sent back to parent form. The DataSet on the child had some rows removed or added.
If i put _dSet = dSet; then my DataSet on the parent is modifying when I delete or add a row (in real time). So when I want to close the child form whitout any modification, the DataSet on parent doesn't change back to the original one.
And on the parent
So the final question is how do I make the Dataset on the parent to not change IF i close the child form (from X) and on the other hant to change (with the new one) IF I press OK Button.
Thank you.
I searched this forum but not found a answer to fit my needs. The problem is: I have 2 forms and one dataset on the parent form who fill a DataGridView. I've passed the dataset to the child form (through a constructor), but now I need the data to be sent back to parent form. The DataSet on the child had some rows removed or added.
Code:
DataSet _dSet;
//..........
public Child(DataSet dSet)
{
InitializeComponent();
_dSet = dSet.Copy();
}
And on the parent
Code:
DataSet dSet;
//..............
private void childButton_Click(object sender, EventArgs e)
{
Child child= new Child(dSet);
//.......
}
Thank you.
Comment