CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Posts
    12

    Question [closed]

    Hi, I am using window application VS2005 to write a program. The listview will only show the data that meet the criteria set in the combobox.

    Is there any way to 'hide' a specific row in the listview instead of removing it? My code is shown below:

    Dim abc As System.Windows.Forms.ListViewItem.ListViewSubItem

    Select Case ComboBox1.SelectedIndex
    Case 0
    sitem = ListView1.Items(2).SubItems(3)
    If ComboBox1.Text <> abc.Text Then
    ListView1.Items(2).Remove() <----- I want to 'hide' instead of removing
    End If
    End Select
    Last edited by YamMilkTea; June 19th, 2009 at 01:17 AM.

  2. #2
    Join Date
    Jan 2000
    Location
    Saskatchewan, Canada
    Posts
    595

    Re: Hide Row in ListView?

    ListView1.ListItems(2).width = 0

  3. #3
    Join Date
    Mar 2009
    Posts
    12

    Re: Hide Row in ListView?

    Quote Originally Posted by d.paulson View Post
    ListView1.ListItems(2).width = 0
    My program wrote: 'ListItems' is not a member of 'System.Windows.Forms.ListView' ?

  4. #4
    Join Date
    Apr 2009
    Posts
    394

    Re: Hide Row in ListView?

    Which means you are in the wrong forum. This is the "Classic" Visual Basic forum and not the VB.NET forums you will find as the next link down on this page http://www.codeguru.com/forum/

    Good Luck

  5. #5
    Join Date
    Mar 2009
    Posts
    12

    Smile Re: Hide Row in ListView?

    Quote Originally Posted by vb5prgrmr View Post
    Which means you are in the wrong forum. This is the "Classic" Visual Basic forum and not the VB.NET forums you will find as the next link down on this page http://www.codeguru.com/forum/

    Good Luck
    Oh ok.. =x

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

Featured