[RESOLVED] RESOLVED Populate ListView
Hi
Please can some one give me an example of how i can populate my ListView with the data from a table in my SQL database?
I have put the columns and headings in place for my ListView but i dont know how to populate it?
My ListView is called lvTasks
Table in my database is called Tasks
and the code for my columns and headers is as follows
Code:
Public Sub CreateListTasks()
lvTasks.Columns.Add("Task ID", 0, HorizontalAlignment.Left)
lvTasks.Columns.Add("For Company", 1, HorizontalAlignment.Left)
lvTasks.Columns.Add("Created On", 2, HorizontalAlignment.Left)
lvTasks.Columns.Add("Status", 3, HorizontalAlignment.Left)
lvTasks.Columns.Add("Time Taken", 4, HorizontalAlignment.Left)
lvTasks.Columns.Add("Cost", 5, HorizontalAlignment.Left)
lvTasks.AutoResizeColumns(1)
lvTasks.FullRowSelect = True
lvTasks.GridLines = True
End Sub
i just want someone to give me and example of how to populate is list view with the data from my table... Anyone Help?
Thanks Roo