|
-
Jun 30th, 2005, 08:27 AM
#1
Thread Starter
Hyperactive Member
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
-
Jun 30th, 2005, 08:29 AM
#2
Re: Adding Row in ListView VB.NET
-
Jun 30th, 2005, 08:32 AM
#3
Thread Starter
Hyperactive Member
Re: Adding Row in ListView VB.NET
It did not show the row added..I add already -> Me.lstVContent.Refresh()....
-
Jun 30th, 2005, 01:37 PM
#4
Thread Starter
Hyperactive Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|