CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #4
    Join Date
    Dec 2002
    Posts
    6

    Wink

    You can change the subitems values by reinitializing the subitems for the ListViewItem as follows:

    Code:
    // Clear the SubItemCollection
    myTestListItem.SubItems.Clear();
    
    // Create a string array to hold the new values
    string[] newItems = new string[]{
    				newString1,
    				newString2,
    				newString1,
    				};
    
    // Add the items to the subItemCollection
    myTestListItem.SubItems.AddRange( newItems );
    
    // After the SubItems collection is cleared, it is reinitialized with a
    // default string.
    // Remove the default SubItem for the collection.
    myTestListItem.SubItems.RemoveAt(0);
    Last edited by kevin-k9; May 29th, 2004 at 09:16 PM.
    K9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured