Adding Row in ListView VB.NET
Hi,
I have a List View in my form name lstVContent. I have a code that adds a columns programmatically but I dont know yet to add a row in it. Any help will greatly appreciated. Thanks.
-Vincentg
'----------------------------------------------------------------------
Sub SetListView()
Me.lstVContent.View = View.Details
Me.lstVContent.Columns.Add("Column1",100,HorizontalAlignment.Center)
Me.lstVContent.Columns.Add("Column2", 100, HorizontalAlignment.Left)
Me.lstVContent.Show()
End sub
'----------------------------------------------------------------------
Private Sub frm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call SetListView()
End Sub
Re: Adding Row in ListView VB.NET
Re: Adding Row in ListView VB.NET
It did not show the row added..I add already -> Me.lstVContent.Refresh()....
Re: Adding Row in ListView VB.NET
Thanks.... I got it.....
Just need to put
ObjItemList.SubItems.Add("column2")
ObjItemList.SubItems.Add("column3")
....
because I have lots of columns.