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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. ListView Question

ListView Question

Scheduled Pinned Locked Moved C#
questiondatabasehelp
5 Posts 2 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.
  • J Offline
    J Offline
    JacquesDP
    wrote on last edited by
    #1

    I have this listview that is populated using an arraylist, I have check boxes assigned to this listview, whenever the user selects a check box the index of the checked item must be returned and the item at that index within the arraylist must be removed. My problem being the following. The actual item.checked can only be used when the itemcheck event has completed, so you can't do that within the event cause it hasn't occured yet. Anyone any ideas? Thanx in advance.

    A 1 Reply Last reply
    0
    • J JacquesDP

      I have this listview that is populated using an arraylist, I have check boxes assigned to this listview, whenever the user selects a check box the index of the checked item must be returned and the item at that index within the arraylist must be removed. My problem being the following. The actual item.checked can only be used when the itemcheck event has completed, so you can't do that within the event cause it hasn't occured yet. Anyone any ideas? Thanx in advance.

      A Offline
      A Offline
      Ahmad Mahmoud candseeme
      wrote on last edited by
      #2

      Hi What then do you want !! Ahmad Shaban

      J 1 Reply Last reply
      0
      • A Ahmad Mahmoud candseeme

        Hi What then do you want !! Ahmad Shaban

        J Offline
        J Offline
        JacquesDP
        wrote on last edited by
        #3

        the index of the checked item must be returned and the item at that index within the arraylist must be removed.

        A 1 Reply Last reply
        0
        • J JacquesDP

          the index of the checked item must be returned and the item at that index within the arraylist must be removed.

          A Offline
          A Offline
          Ahmad Mahmoud candseeme
          wrote on last edited by
          #4

          Hi single click your listview then hit F4 in your keyboard select "Events" scroll down to ItemCheck Event and double click it then type MessageBox.Show ( "The Index of the checked item is " + e.Index.ToString() + "\n Its state was" + e.CurrentValue.ToString() + "\n and now its state is " + e.NewValue.ToString()); put some could so you can get help with the array Ahmad Shaban

          J 1 Reply Last reply
          0
          • A Ahmad Mahmoud candseeme

            Hi single click your listview then hit F4 in your keyboard select "Events" scroll down to ItemCheck Event and double click it then type MessageBox.Show ( "The Index of the checked item is " + e.Index.ToString() + "\n Its state was" + e.CurrentValue.ToString() + "\n and now its state is " + e.NewValue.ToString()); put some could so you can get help with the array Ahmad Shaban

            J Offline
            J Offline
            JacquesDP
            wrote on last edited by
            #5

            Thanks a Mill

            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