Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > does datagridview.datasource override datagridviewcombobox.datasource?
 

does datagridview.datasource override datagridviewcombobox.datasource?

Hey Ya'll,

I'm wondering if it is possible to set the datagridview.datasource to one datatable and then set the datagridviewcombobox.datasource to another datatable that is not in the same dataset as the first datatable. I've been able to set the datasources to two seperate tables as long as those two tables are in the same dataset, but I'd rather have the two datatables as stand alone data sources and not part of a data set. Is this possible? So far I've been unsuccessful.

Thanks is advance!

Dave

dolot  Monday, November 27, 2006 3:56 PM

OK. So I've answered my own question. It seems I wasn't setting the datagridviewcombobox.datapropertyname to that of the datatable. Now my problem is that the two datasources are disconnected. That is, when the grid datasource is populated, it doesn't automatically set the valuemember property of the datagridviewcombobox, so the combobox does not reflect the value in the grid. Any clues as to how to help the control make the association?

Thanks again!

Dave

dolot  Monday, November 27, 2006 6:54 PM

You can use google to search for other answers

Custom Search

More Threads

• Dealing with dataGridView
• Datagridview need Edit in popup between rows
• How do I test if a datagridview has changed?
• C#: Windows Form Application (DLL)
• AutoRowSize problem
• Position on datagrid v position in dataset
• Problem with "Data bound Items" of ComboBox.
• Applying CRUD procedure In a Bindingsource/Binding Navigation in two related tables
• current cell changed
• View and what to bind to