I have a dataGridView with 4 columns. 3 of the columns i want to use a combobox. In the datagridview properties from the design view i already set the columns to DataGridViewComboBoxColumns. how do i from the code set the columns values from a dataset?
I can get the data i need in two datasets just don't know how to tie the data from my dataset to the related columns.
Here is what i have so far. I keep getting a error when the grid loads: "DatqaGridView Default Error Dialog. The following exception occurred in the DataGridView: System.ArgumentException:DataGridViewComboBoxCell value is not valid.
private void StoreHardwareListForm_Load(object sender, EventArgs e)
{
hardwareBindingSource.DataSource = hardware.Tables[ 0 ];
dataGridView1.DataSource = hardwareBindingSource;
DataSet hardwareTypes = DAL.FetchData(SQLCoreSelect.HardwareTypes());
hardwareDescription.DataSource = hardwareTypes;
hardwareDescription.DisplayMember = "hardwareDescription";
hardwareDescription.ValueMember = "hardwareTypeID";
hardwareGroup.DataSource = hardwareTypes;
hardwareGroup.DisplayMember = "hardwareGroup";
dataGridView1.ClearSelection();
}