views:

28

answers:

1

Hi Guys,

It's hard for me to clearly describe my problem but I'll try. I have a UserControl1 which contains UserControl2 which contains several WinForms controls (most of them DevExpress). I do simple binding to these controls to my datatable fields. So far everything works fine. When I move the focus to a record in the table (by navigating in a grid rows for example) the binding works great, the concurrenmcy manager moves the cursor and everything reflects right in the bounded controls.

The problem starts when I add new user UserControl3 above UserControl2 and make UserControl2.Visible = false. Now UserControl3 is shown and UserControl2 exists but not shown. Now when I set UserControl2.Visible = true to show it again the simple binding stops working! I navigate in the grid but either the ConcurrencyManager stops working or the simple binding becomes disconnected.

My question: Are there any known issues/ best practices with the binding & concurrency manager?

Thanks a lot,
Adi Barda

+1  A: 

I found the answer. The guys from devexpress helped me and now I know that in order to succeed with binding one should use the BindingSource object and not use directly the dataset/datatable objects. This solved all my binding problems. I beleive the BindingSource simply working correctly with the concurrency manager and the bindingContext objects.

Adi Barda