dotnet/winforms
Ver no GitHubCannot successfully assign a ListViewItem to a specified group in PropertyGrid
Open
#3.439 aberto em 12 de jun. de 2020
:beetle: bugarea-controls-ListViewhelp wanted
Métricas do repositório
- Stars
- (4.100 stars)
- Métricas de merge de PR
- (Mesclagem média 14d 22h) (56 fundiu PRs em 30d)
Description
- .NET Core Version: 5.0.100-preview.7.20311.17
- Have you experienced this same bug with .NET Framework?: Yes
Problem description:
The setting is not successfully, the Group property was return to ‘(none)’ after clicking OK button.

More Info:
- This issue is not a regression, can reproduce from .NET3.5 ~.NET4.8 in classic project and from .NET core 3.0 ~.NET 5.0 in Core project.
- This issue is not reproducing when setting the Group property in designer properties window.
Expected behavior: The Group property should be set successfully.
Minimal repro:
- Create a Winforms core project.
- Drag and drop a PropertyGrid and a ListView control to Form.
- Add following code in InitializeComponent() part.
public Form1() { InitializeComponent(); propertyGrid1.SelectedObject = listView1; // <-- } - Build and run.
- Add one
ListViewGroupthat Header isGroup1by clicking the browser button next to the Groups property of ListView. - Add one
ListViewItemthat Text isItem1by clicking the browser button next to the Items property of ListView. - Find the Group property of the Item1, and set to ‘Group1’.
- Click OK button in
ListViewItemCollection Editor.
Or
- Run the attached project. SetGroupProperty.zip
- Repeat the above step5~8.