Results 1 to 4 of 4

Thread: [RESOLVED] RESOLVED Populate ListView

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2009
    Posts
    115

    Resolved [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
    Last edited by Roofuss; Jun 11th, 2009 at 01:10 PM. Reason: RESOLVED

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width