Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Link or sharing BindingSources between forms
 

Link or sharing BindingSources between forms

Hi,

My story is the following, I have to forms, first includes a Datagridview and BindingSource,and the other showsdetails of each record using a BindingSource and BindingNavigator. Problem is that controls does'nt synchronize between forms current selection in grid dont reflect the current record in second form (detail).

In second form (detail) I have a method in wich passing the bindingcontext of the first form and the same datasource that I set on BindingSource of the DataGridView, but is not working.

Thanks for any suggestion.

Jfk.Net  Monday, March 06, 2006 4:03 PM

Maybe a bit late but does this help?

http://msdn2.microsoft.com/en-us/library/ms404299.aspx

mt3ch  Thursday, May 18, 2006 12:19 PM

Can't be absolutely sure but I am under the impression that the CurrencyManger (which is responsible for the synch of data bindings) is form level scoped; i.e. each of your forms has it's own CurrencyManager. A form currency manager is shared between all controls on that form.

If that is the case you can't automatically synch between forms. Each currency manager has it's own idea of where it is in the binding source.

Dreedle  Friday, May 19, 2006 11:19 PM
mt3ch  Saturday, May 20, 2006 4:54 PM

You can use google to search for other answers

Custom Search

More Threads

• Connecting to SQL Server 2000 and binding data to textboxes with open connection
• Cycling through each cell? Embarassing question...
• Editing, Sorting, Paging GridView based on custom DataTable
• To calculate a person's age by date, month and year in VB 2008
• How to "manually" start validation of all cells in a DatagridView
• DatagridComboBoxColumn
• Set default sort column in datagridview
• How to Update a database through DataGridView in VB.NET 2008
• DefaultNewRowValue problem
• BindingSource catches cross-thread exceptions when BackgroundWorker updates datasource