This article is a mirror article of machine translation, please click here to jump to the original article.

View: 18995|Reply: 0

[WinForm] C# listview control a cell color

[Copy link]
Posted on 6/20/2019 11:21:48 PM | | | |
For example, to set the color of the cell in row i and column j,
this.listView1.UseItemStyleForSubItems = false;

this.listView1.Items.SubItems[j]. BackColor=;

If you have any questions, please ask

Remember

Only those with ListViewItem setUseItemStyleForSubItems is False, ListViewItem.ListViewSubItem.

Since UseItemStyleForSubItems was not set to false at the beginning, the cell color has not changed, which is really a pit!






Previous:asp.net mvc does a 301 permanent redirect jump
Next:Use case-ignoring strings in C#. Contains method
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com