Text of a ListView item is changed when the Text property of the first subitem is set (822489)
The information in this article applies to:
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
SYMPTOMSYou have a ListView control in Details view and you
add columns to the control. You add an item to the control, and then you set the Text property of the item. When you add a subitem to this item, and
you then set the Text property of the first subitem in the ListViewSubItem Collection Editor dialog box, the text of the item in the first column of the ListView
control is changed to the text of the subitem.
Note The first column in the ListView control displays the Text property of
the items. All the other columns display the Text property of the subitems of the
main item.WORKAROUNDTo work around the problem, add a subitem to the list item, and then set the Text
property. To do this, follow these steps:
- Perform steps 1-10 in the "Steps to Reproduce the Behavior" section.
- In
the ListViewSubItem Collection Editor dialog box, click
Add.
- Set the Text property to
SubItem1, and then click OK.
- In the ListViewItem Collection Editor
dialog box, click OK.
STATUS This
behavior is by design.REFERENCESFor more information, visit the following MSDN Web
site:
Modification Type: | Major | Last Reviewed: | 1/26/2006 |
---|
Keywords: | kbvs2005swept kbvs2005doesnotapply kbProperties kbWindowsForms kbDesigner kbListView kbCtrl kbControl kbprb KB822489 kbAudDeveloper |
---|
|