Results 1 to 4 of 4

Thread: How to show 3 columns in a ListView?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2007
    Posts
    788

    How to show 3 columns in a ListView?

    Dear Friends,

    Could you please let me know the code to get 3 columns in a ListView?

    Thanks.

  2. #2
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: How to show 3 columns in a ListView?

    What? We need to know what you mean. Your question is vague.

    Are you asking how to add data to the ListView and then give each item three additional sub items? Or are you asking how to create additional columns?

    Or something else?
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to show 3 columns in a ListView?

    With nearly 500 posts, you should be at the point where you can look for these things for yourself first, then ask questions about the bits that give you problems.

    http://msdn.microsoft.com/en-us/libr....listview.aspx
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    May 2007
    Posts
    788

    Re: How to show 3 columns in a ListView?

    Quote Originally Posted by jmcilhinney View Post
    With nearly 500 posts, you should be at the point where you can look for these things for yourself first, then ask questions about the bits that give you problems.

    http://msdn.microsoft.com/en-us/libr....listview.aspx
    Thanks. I got the answer. Now another question, How can I show the listview selected data in the respective textboxes? The following code doesn't work for this purpose. Moreover, I have three columns in listview.

    Code:
     Private Sub lVW_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LVW.Click
            With LVW
                Me.Text = .SelectedItems.Item(0).Text
                LVW.Tag = CStr(.SelectedItems.Item(0).Text)
            End With
        End Sub
    Thanks
    Last edited by VBLearner6; Apr 15th, 2010 at 06:30 AM.

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