Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# How to refresh a listview

I've writtent the following code :

this.listView1.Items[i].BackColor = Color.Orange;

I would like to know how can I refresh my listview so I can see in real time the updated listview. Thanks.

like image 675
Stan Avatar asked Oct 22 '25 14:10

Stan


1 Answers

Normally you should not do anything special, and ListView will be redrawn itself when you're changing item's backcolor.

But anyway, you can use listView1.Refresh(); to force its redrawing.

like image 104
Andrey Korneyev Avatar answered Oct 24 '25 04:10

Andrey Korneyev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!