Another question about the listview control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dom

    #1

    Another question about the listview control

    how do I programmaticall y select an item in the listview item? In the
    Listbox, I would just do "ListBox1.Selec tedIndex = x". But the only
    thing similar in the listview is the SelectedIndices Collection, and
    that is "get" only.

  • Alex Meleta

    #2
    Re: Another question about the listview control

    Hi Dom,

    That's because you can select many of them.

    e.g. listView.Items[1].Selected = true;

    Regards, Alex
    [TechBlog] http://devkids.blogspot.com


    how do I programmaticall y select an item in the listview item? In the
    Listbox, I would just do "ListBox1.Selec tedIndex = x". But the only
    thing similar in the listview is the SelectedIndices Collection, and
    that is "get" only.
    >

    Comment

    • Bond

      #3
      Re: Another question about the listview control

      On Aug 31, 2:37 am, Dom <dolivas...@gma il.comwrote:
      how do I programmaticall y select an item in the listview item? In the
      Listbox, I would just do "ListBox1.Selec tedIndex = x". But the only
      thing similar in the listview is the SelectedIndices Collection, and
      that is "get" only.
      hi friend
      here is the solution of which u can completly relly with, that is


      or
      e.g. listView.Items[1].Selected = true;

      Comment

      • Bond

        #4
        Re: Another question about the listview control

        On Aug 31, 2:37 am, Dom <dolivas...@gma il.comwrote:
        how do I programmaticall y select an item in the listview item? In the
        Listbox, I would just do "ListBox1.Selec tedIndex = x". But the only
        thing similar in the listview is the SelectedIndices Collection, and
        that is "get" only.
        The solution for your query is to refer Below Site that ensure that
        actual solution to your specific query


        or
        e.g. listView.Items[1].Selected = true;
        Jitesh tolar


        Comment

        • Dom

          #5
          Re: Another question about the listview control

          On Aug 30, 6:15 pm, Alex Meleta <amel...@gmail. comwrote:
          Hi Dom,
          >
          That's because you can select many of them.
          >
          e.g. listView.Items[1].Selected = true;
          >
          Regards, Alex
          [TechBlog]http://devkids.blogspo t.com
          >
          how do I programmaticall y select an item in the listview item? In the
          Listbox, I would just do "ListBox1.Selec tedIndex = x". But the only
          thing similar in the listview is the SelectedIndices Collection, and
          that is "get" only.
          Thanks, Alex. Don't know why I didn't guess that.

          Comment

          • newscorrespondent@charter.net

            #6
            Re: Another question about the listview control

            You need to select from the items collection something like

            Listview.items[index].select = true;

            It is possible to have more than one selected item.

            Tom Groszko

            Comment

            Working...