I have c# DataGridViews modified so that I can drag and drop rows between them. I need to figure out how to either disable dragging on certain rows, or reject the drop for these rows. The criteria I’m using is a value in the datarow.
I’d like to disable the row (gray it out and not allow drag) as my first choice.
What options do I have? How can I disable or reject drag-drop based on criteria?
If you want to prevent a row from being dragged at all, use the following method instead:
Here, I presume you start the drag operation by doing something like this:
In this case, you don’t need to use the method from my previous answer, of course.