I have a datagridview
where I have allowed the user to reorder columns.
However, when the user moves a column to another place I'd like the adjacent column (visibility = false) to move with it.
I've tried to do it in the ColumnDisplayIndexChanged
event by setting the displayindex
of the adjacent column, however,
I get the following error:
"System.InvalidOperationException: This operation cannot be performed while the DisplayIndex of a column is being adjusted."