views:

89

answers:

1

Hi,

I have created a UserControl in C# that I have put a DataGridView on. When I have only one instance of this UserControl in a WinForms project, it works like intended. When I have two instances of this UserControl in a WinForms project, the second instance of my UserControl behaves the way it should but the first one does not.

It seems like both UserControl instances reference the same instance of the DataGridView some how.

I would much appreciate any advice in this matter.

Many thanks in advance.

A: 

Have you exposed a property on the UserControl that sets/gets the GridView's Datasource? (You can't do this in the UserControl or else you would see the behaviour you are seeing)

Mitch Wheat