Menü

Onwerk Blog

Text of ListView Subitems not updated when using AddRange (WinForms)

When ListView.AddRange was used to add the sub items to an item in a WinForms ListView, a bug in the .NET Framework prevents text updates:
After updating the texts of sub items for a ListView item the new texts are not displayed in the ListView. Invalidating, Updating, Redrawing, Refreshing are not helping.

As KevinBui pointed out in this article „C# setting ListView’s Item’s Subitem’s text does not display“ new sub item texts are not displayed in the ListView when ListView.AddRange was used to add the sub items due to a bug in the .NET Framework.

The solution is not to use AddRange but Add instead.

 

geschrieben von onwerk am 5. Dezember 2018 um 09:37

Nach oben
Zur Desktop-Version