Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. listview

listview

Scheduled Pinned Locked Moved C#
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 9924893
    wrote on last edited by
    #1

    how can we select all the items of a listview by a checkbox inside a listview only.i dont want to use a seperate button for it.can anybody suggest me something

    L J K 3 Replies Last reply
    0
    • U User 9924893

      how can we select all the items of a listview by a checkbox inside a listview only.i dont want to use a seperate button for it.can anybody suggest me something

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Member 9961312 wrote:

      how can we select all the items of a listview by a checkbox inside a listview only

      Loop trough the items, set their "Checked[^]" property?

      Member 9961312 wrote:

      i dont want to use a seperate button for it.can anybody suggest me something

      "When" do "all the items" need to be checked? If it's an action that's initiated by the user, then he/she will need some UI element to interact with. In other words, if not on a button-click, when? How about when the form loads? That'd select them all, even before the list is shown.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

      1 Reply Last reply
      0
      • U User 9924893

        how can we select all the items of a listview by a checkbox inside a listview only.i dont want to use a seperate button for it.can anybody suggest me something

        J Offline
        J Offline
        Jay Nardev
        wrote on last edited by
        #3

        set MultiSelect property true and checked list item in loop.

        1 Reply Last reply
        0
        • U User 9924893

          how can we select all the items of a listview by a checkbox inside a listview only.i dont want to use a seperate button for it.can anybody suggest me something

          K Offline
          K Offline
          Kevin Bewley
          wrote on last edited by
          #4

          If I'm interpreting your question right you want the user to be able to select all of the items in the ListView, but you don't want to give them a button to do it? If so, why not set up a context menu with a Select All option? Then, as others have suggested, step through all the items in the LV and set Checked = true; for each item.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups