Is it possible to make ListView display a text obtained through its ListViewItem.Tag?

Posted by Dimitri C. on Stack Overflow See other posts from Stack Overflow or by Dimitri C.
Published on 2010-04-19T08:27:52Z Indexed on 2010/04/19 8:33 UTC
Read the original article Hit count: 174

Filed under:
|
|

I'd like to fill System.Windows.Forms.ListView with the items I've stored in a separate System.Collections.Generics.List<>. I would like to avoid to store the data twice, once in the List<> and once as a string in ListViewItem. Is there a way to make ListViewItem use some callback function to obtain the text to put in its columns from the Tag property, instead of using its Text property?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about winforms