Closed paul1956 closed 2 weeks ago
@Olina-Zhang - what is the behavior in Framework in this scenario?
@merriemcgaw, in WinForms Framework project, with 2 DGV on a Form add some columns to the first, then add the same column names to the second, it fails with message "The name xxx is already in use by another component", and the column cannot be added to the second DGV.
@merriemcgaw the different is with the current version the column IS ADDED after getting the error message (don't think program will run). When you hit OK in Framework you can correct the issue and then hit Add or Cancel and designer file is unchanged. New error message is much better.
Thanks @paul1956! @Amy-Li03 can you copy this issue into the designer repo so we can try to get it in for the next VS releases? It seems like it would be a pretty simple fix.
~Merrie
Internal repo shows this as fixed.
Environment
Version 17.4.0 Preview 1.0
.NET version
N/A
Did this work in a previous version of Visual Studio and/or previous .NET release?
I think so at least it worked differently
Issue description
If you have multiple DataGridView controls on a form attempting to add columns with the same name doesn't work as expected. With 2 or more DGV's on a Form add some columns to the first, then add the same column names to the second. It fails with message below and then adds the column anyway. I am assuming Column Names need to be Unique on a Form and it's my job to insure that. First that is a pain to do manually, and it would be better if the designer added the DGV name to the column but if that isn't desirable then when the error happens the column should not be added.
Steps to reproduce
See above
Diagnostics
No response