0

When using virtual mode with DataGridView, I am subscribing to the CellValueNeeded event to get data on the fly. In the handler for that I have logic to differentiate between the columns, and if it is a DataGridViewComboBoxColumn, I want to give it a data source. My issue is that when I assign a data source to the cell, I get a stack overflow because in the DGV code, another call to CellValueNeeded is made, and an infinite loop occurs. Is there some clean way around this?

eLymar
  • 195
  • 1
  • 7

1 Answers1

-1

It is going in the loop since cell value is not setting correctly. It requesting data again and again then.

madufit1
  • 206
  • 3
  • 10