Skip to content

Instantly share code, notes, and snippets.

@NPS-ARCN-CAKN
Created July 27, 2017 19:40
Show Gist options
  • Save NPS-ARCN-CAKN/63111b73e8298f3bc2f7124429a52c62 to your computer and use it in GitHub Desktop.
Save NPS-ARCN-CAKN/63111b73e8298f3bc2f7124429a52c62 to your computer and use it in GitHub Desktop.
Synchronized master-detail DataGridViews tip
'Use this tip if you have a .Net DataSet with two or more tables that have a master-detail relationship and you want to show the master data in a DataGridview and the related detail records in another DataGridview.
'This tip assumes you've used the DataSet Wizard and have that all set up. The master DataGridView is easy to set up, just point it to the Dataset and Table you want. To get the detail DataGridView to synchronize with the master you need to set the underlying table's BindingSource's DataSource property to the foreign key relationship of the master table's BindingSource.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment