In VS2005, using C #, I have a Forms application with ListView. I can add items to the list just fine. However, as soon as I try to sort these elements into groups, they are not displayed. I know that groups do not appear when they are empty, but I have confirmed that these groups are not empty. In addition, I set listView.ShowGroups = true. If I add elements to one of the groups, but not the second, the "Default" group appears ... these are just the groups I added that are not displayed!
Here is the code I'm using:
this.listView.View = View.Details; this.listView.Columns.Add("Column1"); this.listView.Columns[0].Width = this.listView.Width - 20; this.listView.HeaderStyle = ColumnHeaderStyle.None; this.listView.Groups.Add(new ListViewGroup("A")); this.listView.Groups.Add(new ListViewGroup("D")); foreach(item i in Class.Items) { if (i.Type == Type.A) this.listView.Groups[0].Items.Add(i.Name); else this.listView.Groups[1].Items.Add(i.Name); } this.listView.ShowGroups = true;
Does anyone have any ideas as to why my bands don't appear? Here is a screenshot of what I see:

Jtoland
source share