Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How can I SetFocus on m ListView when I click on each of the cell??

MY Basic coding..... but every time I only can setFocus on the 1st column... the subItem canot setfocus??

Dim RsCache As New ADODB.Recordset
Dim StrCache As String
Dim ITMX As ListItem

StrCache = "Select * FROM RecognitionSetup"

RsCache.Open StrCache, aConn
ListView1.Gridlines = True
ListView1.ColumnHeaders.Add , , "EmployeeNo"
ListView1.ColumnHeaders.Add , , "EmployeeName"
ListView1.View = lvwReport

If RsCache.RecordCount <> 0 Then
While Not RsCache.EOF
With ListView1.ListItems.Add(, , RsCache.Fields(0)) 'your First Field
.ListSubItems.Add , , RsCache.Fields(1) 'Second Field
End With
End If
Sign In or Register to comment.