DataGridView - Parent to Child Database Relation - Updating child DataGridView data
Would someone kindly assist me with the following? I have two DataGridView objects that each display a DataTable, where the two datatables are related with the following code: DataSet dSet = new DataSet(); DataTable ParentList = ListToDataTable(_listOfAllAlbumObjects); DataTable ChildList = ListToDataTable(_listOfAllTrackObjects); dSet.Tables.AddRange(new DataTable[]{ParentList, ChildList}); DataColumn parentRelationColumn = ParentList.Columns["AlbumId"]; DataColumn childRelationColumn = ChildList.Columns["AlbumId"]; dSet.Relations.Add("ParentToChild", parentRelationColumn, childRelationColumn