Visual Studio DataGridView

An application I wrote to compare values in the rows of two datagridviews, set side-by-side, will hide rows if no difference is found; which then leaves just the rows that are different. Simple enough, but an error was thrown when one of the grid’s cells was active. This is the error.

Row associated with the currency manager's position cannot be made invisible.

The solution is to put the following command somewhere at the top of your routine before accessing the grid rows (C# code).

<DataGridView>.CurrentCell = null

Hope this helps.

Leave a Reply