Checkedlistbox, How to access items using index. visual C#

Discussion in 'Programming' started by uzairfarooq, Jan 3, 2009.

  1. #1
    I have a checkedlistbox in my form and want to access name of selected item using index, how to do this. For example I want to access selected item of index 2, how I can do that.
    Please help me, I will be very thankful.
     
    uzairfarooq, Jan 3, 2009 IP
  2. sampathsl

    sampathsl Guest

    Messages:
    861
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Please try this, this way you can read the selected item.
    textbox.Text=checkedlistbox.Items[checkedlistbox.SelectedIndex].ToString();
     
    sampathsl, Jan 4, 2009 IP
  3. uzairfarooq

    uzairfarooq Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    sorry I don't want to access selected item but checked item. Any code for checked items?
     
    uzairfarooq, Jan 5, 2009 IP