M
MeowCow
I have created a UserControl that encapsulates a third party data grid.
My goal was to create my own DataSource and DataMember properties that
forward the binding to the third party grid, then use binding like
normal.
The problem I am running into is that my UserControl ends up with a
different BindingContext then the ParentForm it is contained in and
thus all other controls on the parent form. (I want various controls
on the form to update as I move between rows in the grid).
As far as I can tell the BindingContext of my user control and the
underlying third party grid get set when the DataSource property is
set. The DataSource property is set before the UserControl is added to
the controls collection on the ParentForm.
I would like my UserControl to use the same BindingContext as the
ParentForm. Does anyone know how to accomplish this so that my
DataSource and is connected to the ParentForm BindingContext?
Any help is appreciated, would gladly post code snippets or clarify any
questions.
~ Adam dR.
My goal was to create my own DataSource and DataMember properties that
forward the binding to the third party grid, then use binding like
normal.
The problem I am running into is that my UserControl ends up with a
different BindingContext then the ParentForm it is contained in and
thus all other controls on the parent form. (I want various controls
on the form to update as I move between rows in the grid).
As far as I can tell the BindingContext of my user control and the
underlying third party grid get set when the DataSource property is
set. The DataSource property is set before the UserControl is added to
the controls collection on the ParentForm.
I would like my UserControl to use the same BindingContext as the
ParentForm. Does anyone know how to accomplish this so that my
DataSource and is connected to the ParentForm BindingContext?
Any help is appreciated, would gladly post code snippets or clarify any
questions.
~ Adam dR.