Results 1 to 4 of 4

Thread: listview and right clicking [RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    listview and right clicking [RESOLVED]

    I've searched all over here and the msdn. I'm trying to right-click on a row in a listview, extract the data that's in each field, then make a sql statement to delete that information from the database it came from.

    basically I just can't figure out how to get the field information.

    any ideas?
    Last edited by Andy; Apr 19th, 2004 at 08:55 AM.

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    This what you mean?
    Property Value
    true if clicking an item selects the item and all its subitems; false if clicking an item selects only the item itself. The default is false.

    The FullRowSelect property has no effect unless the View property of the ListView control is set to View.Details. The FullRowSelect property is typically used when a ListView displays items with many subitems and it is important to be able to see selected items when the item text is not visible due to horizontal scrolling of the control's contents.
    VB Code:
    1. ' Set the view to show details.
    2.     listView1.View = View.Details
    3. ' Select the item and subitems when selection is made.
    4.     listView1.FullRowSelect = True


    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    I have all that set up. I can't seem to figure out how to do the reverse of inserting the items and subitems.

    VB Code:
    1. With lstvwResults
    2.  
    3.                 .Items.Add(reader.Item("Artist"))
    4.  
    5. end with

    just as an example, this puts the information IN the listview, how do you take the info OUT when the user right-clicks on that row and break it back up into the original strings?

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    The selected item is .focusedItem. Then, you can index per column starting with 1.

    this may be a 2003 thing. Can someone confirm that?

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