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);![]()




Reply With Quote