You can add the data to the dataSource window and then drag the DataTable to the form. The following is an article about step-by-set displaying data on a windows forms application.
How to: Display Data in a Windows Forms DataGridView Control
http://msdn.microsoft.com/en-us/library/071hftc7.aspx
Walkthrough: Displaying Data on a Form in a Windows Application (details)
http://msdn.microsoft.com/en-us/library/wwh8ka92.aspx
Walkthrough: Displaying Related Data on a Form in a Windows Application
http://msdn.microsoft.com/en-us/library/803kw7az.aspx
FAQ 26. How do I enable typing in the combo box cell?
http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/a44622c0-74e1-463b-97b9-27b87513747e#faq26
If you also want to show suggestions, set the combobox.AutoCompletedMode.
void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (this.dataGridView1.CurrentCellAddress.X == 1)
{
ComboBox cb = e.Control as ComboBox;
if (cb != null)
{
cb.DropDownStyle = ComboBoxStyle.DropDown;
cb.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
}
}
}
You can bind the comboboxcolumn using datagridviewComboBoxColumn.DataSource property.
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.datasource.aspx
DataPropertyName Property article shows a demo about databound datagridviewComboBox.
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn.datapropertyname.aspx
Best regards,
Ling Wang
Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.