Skip to content

Editing form with DataGridView causes many unwanted changes #13170

@paul1956

Description

@paul1956

Environment

All

.NET version

.Net 9.0

Did this work in a previous version of Visual Studio and/or previous .NET release?

Framework.

Issue description

The WinForm designer for DataGridView adds additional row and column styles with every edit of the form (even if DGV is untouched) and creates new DataGridViewStyles with every edit. After first edit they are numbered 1 to N, next edit N to 2N, next edit 1 to N again if you don’t add any new styles. If you do the numbering gets more mixed up. The file size grows rapidly and it’s difficult to use Git difference because there are so many changes that need to be deleted.

Steps to reproduce

Create a for with DataGridView and anything else, edit anything and save. Upload to GitHub, edit anything, except DGV and save. Do diff and you will see many changes. Edit anything and you will see fewer diffs against GitHub. Each edit/save will cause unwanted changes.

Diagnostics


Metadata

Metadata

Assignees

No one assigned

    Labels

    area-VSDesignerWindows Forms out-of-proc designer related issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions