We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

ListCollectionView

Thread ID:

Created:

Updated:

Platform:

Replies:

102261 Jan 13,2012 12:11 PM Jan 25,2012 02:46 AM WPF 1
loading
Tags: GridControl
Rich Fabros
Asked On January 13, 2012 12:11 PM

Is it possible to bind a Filtered ListCollectionView into the GridDataControl ItemsSource? If i bind this collection, only the unfiltered collection shows up on the grid even though the Grid's DataContext says that ItemsLcv has the correct filtered count.

It's as if the GridDataControl is binding to ListCollectionView.SourceCollection rather than the ListCollectionView with the filter.

I don't know what i'm doing wrong so please help.


I bind it like so..

grid.SetBinding(GridDataControl.ItemsSourceProperty, new Binding("ItemsLcv"));

And my ListCollectionView is created like..

public ListCollectionView ItemsLcv
{
get { return _itemsLcv; }
set
{
_itemsLcv = value;
BuildItemView();
}
}



SelectionExpanderDefinition(ObservableCollection dataItems, List filters ){
_selectionFilters = filters;
_itemsLcv = new ListCollectionView(new List(dataItems));
BuildItemView();
}

public void BuildItemView()
{
// set up LCV
System.Predicate expanderContentFilter = blah blah filter method

_itemsLcv.Filter = expanderContentFilter;
}






Rajasekar [Syncfusion]
Replied On January 25, 2012 02:46 AM

HI Rich,

Thanks for your update, We have prepared the sample based on your requirement and please find the sample in the below location,

Sample: http://www.syncfusion.com/downloads/Support/DirectTrac/88696/SFGridFilter-743336333.zip

Please let us know if you have any queries.

Thanks,
Rajasekar



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;