im wondering how i could add text into seperate columns while the program is running..i can only get something to be added into column1 but not column2 & 3..if anyone could help that'd be great!
You mean add rows to it. I just wrote this function, it should work:
Code:
Public Sub AddRow(ByVal list As ListView, ByVal ParamArray cols() As String)
Try
list.Items.Add(cols(0))
If Not cols.Length > list.Columns.Count() Then
For i As Integer = 1 To cols.Length - 1
list.Items(list.Items.Count() - 1).SubItems.Add(cols(i))
Next
Else
MsgBox("Error! More values than columns.")
End If
Catch ex As Exception
MsgBox("Error!")
End Try
End Sub
End Sub
You mean add rows to it. I just wrote this function, it should work:
Code:
Public Sub AddRow(ByVal list As ListView, ByVal ParamArray cols() As String)
Try
list.Items.Add(cols(0))
If Not cols.Length > list.Columns.Count() Then
For i As Integer = 1 To cols.Length - 1
list.Items(list.Items.Count() - 1).SubItems.Add(cols(i))
Next
Else
MsgBox("Error! More values than columns.")
End If
Catch ex As Exception
MsgBox("Error!")
End Try
End Sub
End Sub