Finding a bound grid.

digitaldan3

Member
Joined
Jun 29, 2005
Messages
7
Programming Experience
3-5
What would be the most efficient way to find the grid a collection is bound to. Is there a way to use databinding to return the control a collection is bound to?

I need a method like GetBoundGrid(myCollection) that returns a datagridview.

This method will be on our EntryFormBase form. This is a 3 panel form consisting of a search area, search results (MainGrid) and a detail section. This base forms handles all the logic for adding, saving and deleting data. (Bad design I know but it's what I inherited.) If I know the current collection I need to determine the grid it is bound to.

The app I am currently working on was created using VS2003 before binding sources were available so it is bound old school.
 
Back
Top