|
-
Jun 18th, 2003, 09:09 AM
#1
Thread Starter
Member
Highlighting row in a listview
The following is my code for highlighting a specific row on a listview based on two variables being equal. Problem is that the correct row gets highlighted only after I scroll up or down. Tried the Refresh method on the listview to no avail. And I've changed the order of the lines between the if..end if with no success. Please help. Thx.
Private Sub selectRow(Index As Integer, cObj As CollectionClassObject)
Dim l_DetailID As Long
Dim i As Integer
For i = 1 To lvDetails(Index).ListItems.Count
l_DetailID = cObj.Item(lvDetails(Index).ListItems(i).Key).DetailID
If m_DetailID = l_DetailID Then
lvDetails(Index).ListItems(i).Selected = True
lvDetails(Index).SetFocus
Exit For
End If
Next i
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|