Hi MikeOng18Blaber,
We can create a new ListViewGroup and add it to the Groups of the ListView. When we need to add a item in this group to the ListView, we ought to add the item to the ListView and set its Group property to the added group. This is a code snippet:
//Add a group.
ListViewGroup group = new ListViewGroup();
group.Name = "NewGroup";
group.Header = "New Group";
group.HeaderAlignment = HorizontalAlignment.Center;
this.listView1.Groups.Add(group);
//Add its items.
this.listView1.Items.Add(new ListViewItem { Text = "TextBox", ImageKey = "TextBox", Group = group });
this.listView1.Items.Add(new ListViewItem { Text = "ListBox", ImageKey = "ListBox", Group = group });
Let me know if this helps.
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.