TysonLPrice
Programmer
I'd like to autosize listview columns to fit the column names. From what I saw this should do it but it doesn't work for me. Can someone see what I'm doing wrong or know of a way to do it? The listview is designed to dynamically build the coulmns based on the number of coumns in a recordset.
Code:
For i As Integer = 0 To lvControl.Items.Count - 1
lvControl.Columns(i).Width = -2
Next i