Results 1 to 2 of 2

Thread: Listview multiple select

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2003
    Location
    India
    Posts
    318

    Listview multiple select

    Hi,

    Is there any way I can select multiple items in a listview programatically in WPF?

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Listview multiple select

    You can just add the item to the SelectedItems collection, like so:

    vb Code:
    1. ListView1.SelectedItems.Add(ListView1.Items(1))
    2. ListView1.SelectedItems.Add(ListView1.Items(2))

    Obviously there I am just adding them by specifying their index but thats just because I dont know exactly how you want to do this.. hopefully it helps anyway
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


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