this is my scenario. I have a customized pane in syspro that is a listview that displays data fetched by a sql query. Now what I want to achieve is to highlight the rows that applies to certain criteria. How do I that using VBScript? I found the following code but have not get it to work? Is there something wrong with this code:
Public Sub Color_Row(intLineCount As Long, RowColor As OLE_COLOR)
Dim itmIdx As ListItem
Dim lstSI As ListSubItem
Dim intIdx As Integer
On Error GoTo ErrorRoutine
Set itmIdx = CustomizedPane.CodeObject.ListItems(intLineCount)
itmIdx.ForeColor = RowColor
For intIdx = 1 To CustomizedPane.CodeObject.ColumnHeaders.Count - 1
Set lstSI.ForeColor = itmIdx.ListSubItems(intIdx)
lstSI.ForeColor = RowColor
Next
Set itmIdx = Nothing
Set lstSI = Nothing
Exit Sub
ErrorRoutine :
MsgBox Err.Description
End Sub
I found that code at http://www.vbforums.com/showthread.php?231157-VB-Color-a-row-in-a-ListView.
How can I color a specific row in the listview?