One DataGridView, one bindingsource, multiple tables
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hello all. I have a datagridview (genericGrid) and a bindingsource (genericBS). genericGrid's datasource is genericBS. I want to programmatically switch genericBS's DataSource and Datamember. Then, display those values on the genericGrid. What I've tried: Using a switch statement to change genericBS's DataSource and DataMember properties on the load. Then, called genericBS.ResetBinding(true). This is supposed to force genericGrid to refresh its rows. Amazingly, it doesn't work. What actually works: I've resorted to creating a bindingsource for each table. Then using a switch statement to change genericGrid.DataSource. This works. But, there has to be a way to use just one bindingsource, right? Any suggestions?