使用vb.net帮助基于特定列中的数据更改listview行颜色 [英] help changing a listview row color based on data in a spcific column with vb.net
本文介绍了使用vb.net帮助基于特定列中的数据更改listview行颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要帮助弄清楚如何根据行数据中的列更改行颜色.
例如:
col 1 col 2
扎克-$ 10
迈克+25
我希望zack的行显示为红色,而mike的行显示为绿色.此列表视图从excel文件获取其数据,因此数据始终在更新,这就是我遇到问题的地方.当我按下刷新"按钮时,我需要执行此操作,以使其在按钮下单击,而这必须发生
请帮助...
I need help figuring out how to change a row color based on a column in that rows data.
example:
col 1 col 2
zack -$10
mike +25
i want zack''s row to show up as red and mike''s to show up with green. This list view gets its data from a excel file so the data is always getting updated and thats where i m getting stuck. I need to do this when i hit the refresh button so its under a button click that this has to happen
please help...
推荐答案
10
迈克+25
我希望zack的行显示为红色,而mike的行显示为绿色.此列表视图从excel文件获取其数据,因此数据始终在更新,这就是我遇到问题的地方.当我按下刷新"按钮时,我需要执行此操作,以使其在按钮下单击,这必须发生
请帮忙...
10
mike +25
i want zack''s row to show up as red and mike''s to show up with green. This list view gets its data from a excel file so the data is always getting updated and thats where i m getting stuck. I need to do this when i hit the refresh button so its under a button click that this has to happen
please help...
我自己弄清楚了
i figured it out myself
If Value3 = "XXXX" Then
item.BackColor = Color.Gold
End If
这篇关于使用vb.net帮助基于特定列中的数据更改listview行颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文