0

With relation to my previous question mentioned here: Custom DataGridViewColumn value disappears after loosing focus

I tried to change my EditControl class. I added an override to the 'OnTextChanged' method. When I run and debug my application, I came to know that the 'EditingControlDataGridView' property for the custom control is not being set. Even though in the designer code I am adding the column into the MetroGrid.

What can the issue be?

Community
  • 1
  • 1
progrAmmar
  • 2,606
  • 4
  • 29
  • 58
  • Put a breakpoint inside the `OnTextChanged` and examine the call stack. It might be called from some code outside the grid view infrastructure. Also you may add a null check for `EditingControlDataGridView` property and do nothing (don't set `valueChanged`, don't call `NotifyCurrentCellDirty`). – Ivan Stoev Jan 28 '16 at 12:35
  • I fixed it, just put in a condition if datagrid wasn't null then execute the code. – progrAmmar Jan 29 '16 at 00:35

0 Answers0