Hi,
unable to set the below string value to Combox in Datagridview in DefaultValuesneeded
e.Row.Cells["Type"].Value = "P";
Pop up the Below error:
System.ArgementException:DataGridViewComboBoxCell Value is not valid
Please reply back if you know the answer.
Thanks
Implemented this code, while running i got the below error.
for (int i = 0; i < ProcurementDetailsDataGridView.Rows.Count; i++){
DataGridViewComboBoxCell cell = ProcurementDetailsDataGridView.Rows[i].Cells["Type"] as DataGridViewComboBoxCell;
if (cell != null)
{
cell.Items.Add("P");
cell.Items.Add("PR");
}
}
After Implementation i got this error.
ArgumentException was unhandled
Items collection cannot be modified when the DataSource property is set.