tags:

views:

46

answers:

1

I've a collection in viewmodel binded to listbox. I want to hide a particular type from the collection. Here is the code:

public ObservableCollection [YZModeModelView]  YZModeModelView
{
    return this.XModelVIew.YZModelViewCollection;
}

I want to a particular type of model view's from YZModelViewCollection. eg. ModelView's with property abc set to null.

Any suggestions ...

A: 

I found the solution. We use ListCollectionView for such scenario where we want to filter, sort a collection.

If we use ListCollection (which is by default) then it changes the orginal source of collection also thats why if we need to show filter enteries only at some specific places then we use ListCollectionView.

Rohit Kandhal
This may assist you http://joshsmithonwpf.wordpress.com/2007/06/12/searching-for-items-in-a-listbox/
Veer
add filter in collectionview.
Rohit Kandhal