You are here:

VB.NET/about listvidw control

Advertisement


Question
Hi!
I want to enter data in listview control at runtime.
How can I do this?
Please clearify my query.
Thank You.

Answer
ListView is a powerful control.

Simple example from http://visualbasic.w3computing.com/vb2008/4/vb-listview-sample-project.php
Dim LItem As New ListViewItem()
LItem.Text = "Alfred's Futterkiste"
LItem.SubItems.Add("Anders Maria")
LItem.SubItems.Add("030-0074321")
LItem.SubItems.Add("030-0076545")
LItem.ImageIndex = 0
ListView1.Items.Add(LItem)
LItem = New ListViewItem()
LItem.Text = "Around the Horn"
LItem.SubItems.Add("Hardy Thomas")
LItem.SubItems.Add("(171) 555-7788")
LItem.SubItems.Add("(171) 555-6750")
LItem.ImageIndex = 0
ListView1.Items.Add(LItem)


More advanced examples can be downloaded as per this blog (this is in ASP.NET Web example). Follow the download link in the article
http://blogs.msdn.com/b/mikeormond/archive/2008/01/23/some-asp-net-3-5-listview-


In general for any .NET samples a very good resource is http://code.msdn.microsoft.com/

Finally you can always lookup msdn.microsoft.com Library section that gets the API reference and it too typically has samples http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.aspx

Hope this helps!  

VB.NET

All Answers


Answers by Expert:


Ask Experts

Volunteer


Anup Mistry

Expertise

WILL ANSWER: .NET Framework, WinForms, Windows Mobile, XML, SQL Server, T-SQL, Database related, Databinding, collections, Grid, DevExpress Framework, Web based, HTTP, IIS, ASP.NET anything web-related

Experience

Been software developer for 10+ years. Worked on various large business applications (Warehousing + Distribution, Financial, Healthcare). Worked on Mobile development (Proof of Delivery, Consumer based Infotainment application, Web based apps). Never stopped programming all these years. Worked on embedded, small, medium and large scale databases. Even in leisure time am reading computer related magazines. Have been a visiting professor at educational institutes teaching corporate and college students alike. Held Systems Analyst, Technical R&D member positions as well.

Publications
Speaker at Planet PDA on topic “Developing Apps for the Pocket PC” Seminar at Fairleigh Dickinson University, NJ on topic “Wireless LAN and Wireless Software applications”

Education/Credentials
Bachelors Degree in Engineering Electronics and Telecommunications Mobile Cellular Systems Satellite Communications

Awards and Honors
Brainbench certifications: (Microsoft.NET, Java 1, Oracle, Network Technical National Center for Software Technology: D-Level (software engineering exam)

©2016 About.com. All rights reserved.