collectionview

Asynchronously call CollectionView.MoveCurrentToFirst?

Asynchronously call CollectionView.MoveCurrentToFirst? ...

Databinding collection of collections

Hello I looked for on the web during a long time and I can't find my answer. I have two classes: 1) Customer: Customercollection which inherits from ObservableCollection. It contains dependency property: String Cname; String Cemail; OrdersCollection Orders; 2) Orders: OrdersCollection which inherits from ObservableCollection. ...

WPF Combobox loaded with list collection view fails to update selection on change (MVVM).

Hi Guys, Ok here is the deal (a bit wordy but I hope you will get the idea) I use MVVM for binding properties of a combo. The combobox is bound to a ListCollectionView with source collection of employee objects which is sorted by the emp. name . There is binding on SelectedValue of the combobox by the employee id. DisplayMember is em...

Combobox with collection view itemssource does not update selection box item on changes to the Model

Hello, Sorry for the earlier lengthy post. Here is my concise (!) description. I bind a collection view to a combobox as a itemsSource and also bind its selectedvalue with a property from my view model. I must keep IsSynchronizedWithCurrentItem="False". I change the source list ofr the view and then refresh the view. The changed (adde...

WPF/MVVM: How can I use several CollectionView`s for aggregated entities ?

Hello, I have a Customer with Orders and those have products. Everything aggregated with collections of type ObservableCollection. All 3 collections are bound to a datagrid/combobox. I can only make the root collection (ObservableCollection Customers{ get;set;} ) passing to a CollectionView so I can move the current customer within t...

WPF: How to use views like ICollectionView and IEditableCollectionView

I understand the syntax but not how really to use it. It's clear in many basic scenarios but as soon as it get's a little bit advanced I start getting a headache. For example there are many different views but often not clear wich one to use. Also should you use always just one or mix and match. Do you use the view as your itemssource f...

WPF - how to synchronize CollectionView's CurrentPosition with ListBox?

Summary of my question: I am canceling from CollectionView's CurrentChanging event and ListBox still allows highlighting other items (even though the current position doesn't get changed. How can I prevent ListBox from highlighting other items? More details: I have a ListBox showing entities, synchronized with controls to edit it. IsSy...

WPF ICollectionView Filter Reset

Hi! I have a CollectionView from an ObservableCollection: private static ObservableCollection<CalculationViewModel> _calculations; CalculationViewModelsCollection = (CollectionView)CollectionViewSource.GetDefaultView(_calculations); My problem is that, when the result of the filter is nothing, I'd like to clear the filter, and refil...

DataGrid is not obedient to SelectedIndex property set

I need to make the DataGrid, so if I am in edit mode, and the current row is not valid, the user should not be able to select a different row. In fact, I think that the DataGrid is supposed to avoid selection of another row once the CollectionChangingEventArgs of the CollectionView is flagged for cancellation, the DataGrid should stick ...