I am facing a problem in binding the datagridviewcom bo box cell.
after binding the comboboxcell and adding it to row.
when i access the item collection as follows.
i am getting an error
"InvalidArgumen t=Value of '0' is not valid for 'index'.
Parameter name: index"
is there any solution for above problem?.
Code:
DataGridViewComboBoxCell cmbControlTypes= new DataGridViewComboBoxCell(); cmbControlTypes.DataSource = result.resultTable; cmbControlTypes.DisplayMember = "name"; cmbControlTypes.ValueMember = "id";
when i access the item collection as follows.
Code:
cmbControlTypes.Value = cmbControlTypes.Items[0]
"InvalidArgumen t=Value of '0' is not valid for 'index'.
Parameter name: index"
is there any solution for above problem?.
Comment