listView

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pedro007
    New Member
    • Nov 2009
    • 19

    listView

    hi,

    i add an item at run time in a listview ,and i would like the added item as a column in another listview

    matrixuserlist. columns.add(Doo rlistname.Items )// not work!

    how can i make that?!

    thanks.
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    Make sure your listview is using a style that uses columns, such as 'Details'

    Comment

    • pedro007
      New Member
      • Nov 2009
      • 19

      #3
      listview is already set to detail.

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        Well... "not work!" doesn't tell us much. Do you get an exception or error?

        This is right out of one of my programs:
        Code:
        lvMedia.SelectedIndexChanged += new EventHandler(lvMedia_SelectedIndexChanged);
        lvMedia.Width = 400;
        lvMedia.Height = 400;
        [B][I]lvMedia.Columns.Add("Media File", 390, HorizontalAlignment.Left);[/I][/B]
        lvMedia.View = View.Details;
        lvMedia.MultiSelect = false;
        Columns.Add takes a string as the column name. Are you sure that (Doorlistname.I tems) returns a single string? It looks more like a collection.

        Comment

        • pedro007
          New Member
          • Nov 2009
          • 19

          #5
          yes doorlistname.it ems dont return a string ,its right!

          have you a idee with a member or so to return a string?
          thanks

          Comment

          Working...