wclairmont
asked on
VB6 Listview Hidden column appears on row select
Can someone help me!
I have a listview populated by an ADO dataset. In this listview there are 4 columns, and the first column is hidden (width = 0). When I select any row in the listbox, the first column appears displaying the current value (primary key) of row selected. Is there a way to turn this off? Or do I have to code for this? if I have to code for this, please lead me in the right direction...
Unfortunately I have tried everything to no avail, so any help would be appreciated!
Thanks a bunch!
I have a listview populated by an ADO dataset. In this listview there are 4 columns, and the first column is hidden (width = 0). When I select any row in the listbox, the first column appears displaying the current value (primary key) of row selected. Is there a way to turn this off? Or do I have to code for this? if I have to code for this, please lead me in the right direction...
Unfortunately I have tried everything to no avail, so any help would be appreciated!
Thanks a bunch!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Why don't you put your data into a combo box
This is how I do it and it works well for me:
Private Sub FillListView()
Dim strKey As String
With lsvInvoiceDetails
LockWindowUpdate Me.hWnd
.View = lvwReport
.ListItems.Clear
.ColumnHeaders.Clear
.ColumnHeaders.Add 1, "ItemNo", "Item No.", 1500
.ListItems.Add 1, , "Hidden"
End With
End Sub
Private Sub FillListView()
Dim strKey As String
With lsvInvoiceDetails
LockWindowUpdate Me.hWnd
.View = lvwReport
.ListItems.Clear
.ColumnHeaders.Clear
.ColumnHeaders.Add 1, "ItemNo", "Item No.", 1500
.ListItems.Add 1, , "Hidden"
End With
End Sub
Sorry you will have to replace 1500 with 0
This is how:
Private Sub FillListView()
Dim strKey As String
With lsvInvoiceDetails
LockWindowUpdate Me.hWnd
.View = lvwReport
.ListItems.Clear
.ColumnHeaders.Clear
.ColumnHeaders.Add 1, "ItemNo", "Item No.", 0
.ListItems.Add 1, , "Hidden"
End With
End Sub
Private Sub FillListView()
Dim strKey As String
With lsvInvoiceDetails
LockWindowUpdate Me.hWnd
.View = lvwReport
.ListItems.Clear
.ColumnHeaders.Clear
.ColumnHeaders.Add 1, "ItemNo", "Item No.", 0
.ListItems.Add 1, , "Hidden"
End With
End Sub
ASKER
Its just the listview control... (i wish I could send you a picture of the appearing hidden column)