Questions tagged [icollectionview]

An interface that enables collections to have the functionalities of current record management, custom sorting, filtering, and grouping.

The ICollectionView Interface, available in .NET 3+, enables collections to have the functionalities of current record management, custom sorting, filtering, and grouping.

http://msdn.microsoft.com/en-us/library/system.componentmodel.icollectionview.aspx

135 questions
0
votes
1 answer

ICollectionView CurrentPosition is -1

I have a ICollectionView from a ObservableCollection, WorkingSpreadOrderCollevtionView = CollectionViewSource.GetDefaultView(SpreadOrderCollection); my SpreadOrderCollection is not empty, as can be seen the SourceCollection count is 1 But why the…
tesla1060
  • 2,621
  • 6
  • 31
  • 43
0
votes
1 answer

Can I pass a filtered CollectionViewSource to a method?

I create a public CollectionView (cvs) and bind that to my ListView Control in a WPF application. Then there are a series of filters that add in delegates to filter my cvs object. Everything works fine in this aspect of the program. public…
0
votes
0 answers

How can I tell if the underlying ICollectionView is actually dirty

I have been building a wpf user control to act as a data navigator for use on various forms. It takes as it's data source the underlying ICollectionView from a view model as do other controls on forms like grids. The view on the grid is setup…
Dom Sinclair
  • 2,458
  • 1
  • 30
  • 47
0
votes
0 answers

Binding To ICollectionView is not working

So, I am making a List of UserControl which ViewModel is assigned via ItemsControl
Moses Aprico
  • 1,951
  • 5
  • 30
  • 53
0
votes
2 answers

Find distinct elements based on the name of the Property

I am trying to build a generic Filter Control that displays unique values in the data grid, and lets the user filter the unique values for a particular column in the grid. I liked the answers proposed for this question, however all of those require…
Shankar Raju
  • 4,356
  • 6
  • 33
  • 52
0
votes
1 answer

Refresh view after EF LoadAsync

Assuming large set of data to be loaded, I want the UI be responsive while loading data. Currently the only working code is the following which constantly refreshes the UI which is not desired. How to have data loaded in non-UI thread and gets the…
Mohsen Afshin
  • 13,273
  • 10
  • 65
  • 90
0
votes
1 answer

Detect when DataGrid have and dont have content

I want to Bind a Button IsEnabled property to DataGrid property/Event when it has a Content. The DataGrid's Item Source is an Observable collection but Since I implement Filtering, what is displayed can be different from the ItemSource…
electricalbah
  • 2,227
  • 2
  • 22
  • 36
0
votes
1 answer

Load ICollectionView With Task Library

I've the following problem: if I load a simple list into ICollectionView which is bound on my wpf listbox, then CurrentChanged event being raised as I expected: List l = new List(); l.Add(1); l.Add(2); MyCollection =…
bit
  • 934
  • 1
  • 11
  • 32
0
votes
1 answer

Keep order of items in ICollectionView if they are considered equal

I have the following situation: I get a list of items which should be sorted by the SortId property. I have implemented the IComparable interface in my ItemViewModels, so that I can use Comparer.Default in my ICollectionView.CustomSort property…
gehho
  • 9,049
  • 3
  • 45
  • 59
0
votes
0 answers

WPF DataGrid Not Return DataGridRow

I am using DataGrid in WPF application, using for loop for retrieving DataGridRow one by one until last, currently I sort datagrid by help of ICollectionView after using ICollectionView my for loop is not working. XAML markup:
0
votes
1 answer

How to tell if an ICollectionView is currently filterable?

I am binding the ItemsSource property of a DataGrid to a property in my ViewModel. I am then creating an ICollectionView and creating a default view with the DataGrid's item source like so: _displayItemsView =…
Sloth Armstrong
  • 1,066
  • 2
  • 19
  • 39
0
votes
0 answers

Bug in datagrid? Strange behaviour with disabled datagrid row

I am using an ICollectionView of an ObservableCollection to display data in a DataGrid. Each entry consists of an IsEnabled property (displayed in a DataGridCheckBoxColumn) and two Integer values (each in one DataGridTextColumn). When the IsEnabled…
tabina
  • 1,095
  • 1
  • 14
  • 37
0
votes
1 answer

Implement ICollectionView with support for Grouping

I'm currently working on trying to implement Grouping in a VirtualCollection. Are there any Tutorials what and how I need to implent of ICollectionView so that Grouping with the DataGrid (in WPF and SL) works? Project I work on:…
Jochen Kühner
  • 1,385
  • 2
  • 18
  • 43
0
votes
1 answer

Bound items in extra thread not deletable from dispatcher thread

RefreshItems is called from the constructor of the ViewModel and when the user wishes it (RefreshCommand on button click). Delete is also bound to a DeleteCommand. I want to refresh the items within a new thread because of some animations which…
timmkrause
  • 3,367
  • 4
  • 32
  • 59
0
votes
3 answers

Is there a way to create a collection view that transforms it's source?

I have an ObservableCollection that holds one type of object. I need this to be the source for several list controls but I also want to transform the data. For simplicity, imagine I have an ObservableCollection and want to get an…
R-C
  • 321
  • 4
  • 11
1 2 3
8
9