Ok, you have 40 "Master" forms, one other form with combobox and datagridview. The combobox contains the names of the other 40 forms. If a form is selected in the combobox, you want to bind the datagrid in that form to a dataset in the "other" form?
One would think that passing the dataset to the other form would be the best way to do that. But I don't think it will work due to the restrictions of cross thread GUI references.
Try this... Set the Datagridview accessor to PUBLIC in one of the 40 forms. When combobox is selected bind the dataset to the datagridview in the other form. Make sure to include the datamember too.
I'm afraid this won't work. So the question is why wouldn't you have those datagrids bound to their own dataset in that form? |