How to show/hide empty groups in RadListView control.
Environment
Product Version | Product | Author |
---|---|---|
2023.2.718 | RadListView for WinForms | Dinko Krastev |
Description
In this particular case, we will demonstrate how we can hide an empty group without deleting it or adding a new one.
Solution
Subscribe to the VisualItemFormatting event. In the event handler, we can get the ListViewDataItemGroup and hide it if it does not contain any items. This way when you run the application, you can observe that the "Empty Group" is not visible. The group will appear when an item is added to it.