elements(list view)

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

    elements(list view)

    Hello,
    How can I pass over all the elements that are in the first column of
    listview?
    I need to do it in a loop and to present each cell value,how?
    Thank you!



    *** Sent via Developersdex http://www.developersdex.com ***
  • Salvador

    #2
    RE: elements(list view)

    Hi Juli,

    ListView YourListView = new ListView();
    ListView.ListVi ewItemCollectio n Coll = YourListView.It ems;

    Now you have the Collection ready to send it or to browse it.

    Hope this helps
    Salva



    "juli jul" wrote:
    [color=blue]
    > Hello,
    > How can I pass over all the elements that are in the first column of
    > listview?
    > I need to do it in a loop and to present each cell value,how?
    > Thank you!
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    >[/color]

    Comment

    • Salvador

      #3
      RE: elements(list view)

      Hi Juli,

      ListView YourListView = new ListView();
      ListView.ListVi ewItemCollectio n Coll = YourListView.It ems;

      Now you have the Collection ready to send it or to browse it.

      Hope this helps
      Salva



      "juli jul" wrote:
      [color=blue]
      > Hello,
      > How can I pass over all the elements that are in the first column of
      > listview?
      > I need to do it in a loop and to present each cell value,how?
      > Thank you!
      >
      >
      >
      > *** Sent via Developersdex http://www.developersdex.com ***
      >[/color]

      Comment

      • juli jul

        #4
        RE: elements(list view)

        It's not working - I don't have the collection property in list. Is
        there some other way to get the list items?




        *** Sent via Developersdex http://www.developersdex.com ***

        Comment

        • Salvador

          #5
          RE: elements(list view)

          Hi Juli,

          Actually it is there, I have written a simple example:

          System.Windows. Forms.ListView MyList = new System.Windows. Forms.ListView( );

          MyList.Items.Ad d("Test1");
          MyList.Items.Ad d("Test2");

          System.Windows. Forms.ListView. ListViewItemCol lection Coll = MyList.Items;

          foreach (object Entry in Coll)
          {
          System.Diagnost ics.Debug.Write Line(Entry.ToSt ring());
          }

          MyList.Dispose( );

          This works perfectly fine,
          Hope this helps

          Salva


          "juli jul" wrote:
          [color=blue]
          > It's not working - I don't have the collection property in list. Is
          > there some other way to get the list items?
          >
          >
          >
          >
          > *** Sent via Developersdex http://www.developersdex.com ***
          >[/color]

          Comment

          Working...