Hi to all,
I have several columns in a listview some of which contain numeric values.
I want that if a subitem value is less than 10 then its forecolor be red.
I have set
.UseItemStyleForSubItems = False
and no luck.
with LV
For Each lvi As ListViewItem In .Items
For j As Integer = 0 To .Columns.Count - 1
If j = 3 Then
lvi.SubItems(j).BackColor = Color.Blue 'entire column backcolor is blue This is OK
'I have tried the following but no success
if lvi.SubItems(j).text>=0 andalso lvi.SubItems(j).text<10 then
lvi.SubItems(j).foreColor = Color.red 'this fails
end if
End If
next
end with
I have several columns in a listview some of which contain numeric values.
I want that if a subitem value is less than 10 then its forecolor be red.
I have set
.UseItemStyleForSubItems = False
and no luck.
with LV
For Each lvi As ListViewItem In .Items
For j As Integer = 0 To .Columns.Count - 1
If j = 3 Then
lvi.SubItems(j).BackColor = Color.Blue 'entire column backcolor is blue This is OK
'I have tried the following but no success
if lvi.SubItems(j).text>=0 andalso lvi.SubItems(j).text<10 then
lvi.SubItems(j).foreColor = Color.red 'this fails
end if
End If
next
end with