dataGridView.Rows.Add(
metaData.Offset.ToString("X2"),
metaData.Length,
metaData.Format, // This parameter goes to a ComboBox cell which throws an
metaData.Description, // exception above
null,
null);
What is the valid way to programmatically assign data to DataGridViewComboBoxCell
?
To Solve this problem, just add “DataError” for DataGridView. That’s all, steps: Double click the datagridview and select the “dataerror” event from the event list.
The DataError event enables you to handle exceptions thrown in code that is called by the control during data processing operations.
thats it :)