0

I need two combo box cell in my data grid view that when we select item in first one the second binding source should be change to something for example : we select a bank name from the first combo box the second combo box item should be the items that belong to that bank

My binding combo box is properly working but in any event when I try to handle the changing the second datasource it have given me error like image below, datagridview error datagridviewcomboboxcell not validate how can it be? error datagrid view image

[1]: https://i.stack.imgur.com/u9yMO.png

Nivas Pandian
  • 416
  • 1
  • 7
  • 17
Carol
  • 1
  • 2

1 Answers1

1

DataGridView's default error handling seems to work on assumption that it cannot assume anything. So, normally it's quite safe to just override it.

myGrid.DataError += myGrid_DataError;

private void myGrid_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
    // ignore
}

Also gives you a place where to write actual error handling, should it become necessary.

Avo Nappo
  • 620
  • 4
  • 9