If you decide later (once you have an idea of how to better design your code), to test after the fact, that's fine.
The important thing right now is to separate the concerns. It's more or less the default design pattern for Win Forms.
We would not want the Cell Value Changed event firing every single time a letter was added to a person’s last name.
Still, it doesn’t make much sense when we think about the way Check Box’s work, in that, they can only ever be On or Off, and that once you have made your selection, you’re probably pretty confident that you want to change the value.
The problem I am having is how to refactor logic to an external class, that has references to the winform controls.
Form All following code is part of private string last Edited Cell Value; private void dgv Replenish_Cell Begin Edit(object sender, Data Grid View Cell Cancel Event Args e) private void dgv Replenish_Cell Validating(Object sender, Data Grid View Cell Validating Event Args e) private void dgv Replenish_Cell Clicked(object sender, Data Grid View Cell Event Args e) private void dgv Replenish_Cell Formatting(object sender, Data Grid View Cell Formatting Event Args e) private void dgv Replenish_Cell Value Changed(object sender, Data Grid View Cell Event Args e) The truth is, it's really very hard to refactor this code out of the code behind once it's been written like this.
I want to refactor this code that is currently in a partial Form Class and deals with edits made on certain cells in a datagridview (in this case called dgv Replenish).
Meanwhile, we can use the Validate Row event in the same way to prevent the user from exiting the current row.
The Kettic Data Grid View allows users of the control easily validate data grid cells when data is committed to the data source.