CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2001
    Location
    Israel
    Posts
    9

    ListView - Knowing How Much is Selected

    Wanted to know if it is possible to know how many and which lines did the user selected in the listview if the multi Selection is enabled.
    Like the RowSel in Grid, but here the user can choose any one he want, so how can i know?



  2. #2
    Join Date
    Aug 2000
    Location
    Namibia
    Posts
    139

    Re: ListView - Knowing How Much is Selected

    Hi,
    testing if any items where selected at all use
    if listview1.selecteditem = nothing then


    to get the selected items you must iterate the list items and test each item's 'selected' property.
    for i = 1 to listview.listitems.count
    if listview.listitems(i).selected then
    'This item is selected
    else
    'This item is NOT selected
    endif
    next i



    PhunkyDude


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