I want to know how to add image in list view sub item.
I am using this code to display text in the sub item.
double Text = "2452";
ListViewItem lItem = new ListViewItem();
lItem.SubItems.Add(Text.ToString());
I want to do something like this
ListViewItem lItem = new ListViewItem();
lItem.SubItems.Add(Text.ToString() + "C:\\image.png");
Thanks In Advance.
ListView does not support this.
I found another answer, suggesting that you switch it with DataGridView.
How can I set an icon for a ListViewSubItem?
You could of course, do custom painting of the ListView if you wish, but I must say that things will get very complicated this way.