# Owl's Blog on .NET development

Component Owl codes Better ListView control all night so you don't have to.

## Hiding Items in Better ListView

Blog Post by Libor Tinka published on Monday, 06 February 2012 in Better ListView

We currently introduced a BetterListViewItem.Visible property to allow hiding items visually, but keeping then in the Items collection:

Making items invisible

The above image shows two groups of items. The first groups uses hiding of items with the Visible property, while the second group simply turns off drawing of ceratin items.

The first approach is useful when you need to hide item as if it is removed, but keep it actually within Items collection.

The second approach need to create new control inheriting from BetterListView, overrride the OnDrawItem method and set properties like BetterListViewDrawItemEventArgs.DrawImage to false or simply not call the base implementation of OnDrawItem.

The second (owner drawing) approach is useful when you need just to switch off display of item without changing the item layout.

Tags: better listview, drawing, hide, hiding, invisible, items, owner, ownerdraw, visible

### Leave a Reply

Click here to cancel reply.

Name (required)

Mail (will not be published) (required)

Website