Hi Christian,
To get the grid to work with two tables, they would need to be in the same dataset with the relationship set. You would need to copy one of the tables into the other's dataset. Set the relationship in the dataset, then bind the datagrid.
>But then I can only save the data to one of the two tables, correct?
>If I save it to the second table afterwards, the rowstate property has changed, and the data doesn't get saved. (because all the fields are "unchanged")
>Of course I could copy the datatable before saving it, then save the copy to the first table, make a new copy of the datatable and save that to the second table, but that doesn't seem like "the right way to do it". I tried this and it works, but then deleting a record from the grid is still a problem.
>It seems to me that I can't find the proper way to do this.
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi