How can I programmatically change KeyView ListView in my collection?

I have a WinView ListView with several items already in them. When I get more information about objects, these Items represent one of the things I want to change, this is the key that will be used to access them from the ListViewItemCollection. Unfortunately, the Add method and constructor enumerate the key parameter, which is not available in the public (or private in this case) ListViewItem.

How can I change the value set by the "key" in the Add method?


I already solved it, but it took me a lot of time, so if someone has the same problem, here is the answer.

+4
source share
1 answer

The Name property also changes the key in the collection. See ListViewItem.Name Property .

+7
source

Source: https://habr.com/ru/post/1772704/


All Articles