specifying column to write in ListView

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

    #1

    specifying column to write in ListView

    I have a listview with two columns that is supposed to show the contents of
    two files.
    I the 1st column, I just display it with listView1.Items .Add ("Test") and a
    While loop, but how can I tell C# to write in the second Column?

    Thanks.


  • William Ryan

    #2
    Re: specifying column to write in ListView

    After you add the item, add a subitem. Make sure the ListView is set to
    Details

    ListViewItem item = new ListViewItem("T est");
    item.SubItems.A dd("SecondColum nValue");

    "Vaughn" <vonchi_m@yahoo .com> wrote in message
    news:ujLfHhGhDH A.3636@tk2msftn gp13.phx.gbl...[color=blue]
    > I have a listview with two columns that is supposed to show the contents[/color]
    of[color=blue]
    > two files.
    > I the 1st column, I just display it with listView1.Items .Add ("Test") and[/color]
    a[color=blue]
    > While loop, but how can I tell C# to write in the second Column?
    >
    > Thanks.
    >
    >[/color]


    Comment

    Working...