Hello.
Looks like there is no possibility to sort items in XamComboEditor binded to PagedCollectionView in ViewModel. Project to reproduce issue is attached.
Several questions related to comboeditor in in multiselection mode:
Advise, please.
Thanks.
Andrey
Hi Andrey,
I'm not sure what you mean about sorting the items in the XamComboEditor. If you hooked up to a PagedCollectionView, and have SortDescriptions set, they will get sorted.
I took a look at your sample, and it works just fine. However, you're reseting the Sort order ascending in your RefreshPcv call when you set SortOrder = true, so if you're expecting it to be descending, thats why you're not.
As for your other questions.
1. No, you can't bind to SelectedItems directly, as the property doesn't have a Setter. If you read the following forum thread, my colleague Devin wrote a sample doing this with a behavior: https://www.infragistics.com/community/forums/f/retired-products-and-controls/53718/what-s-the-selecteditem-for-xamcomboeditor-if-mutiple-selection-allowed/277868#277868
2. No, you can't bind to the checkbox's IsChecked property
3. With a custom ItemTemplate, you could bind to a property in your data model, that represents a selected property. However, you wouldn't be able to associate it with a XamComboBoxItem, as that's not part of the DataContext
-SteveZ
Hi Stephen.
Thanks for your answers. And especialy for the link to behavior demo. That's what I'm looking after.
About sorting. I'm looking for possibility to change items order dinamically depending of the SortOrder property in ViewModel. And I probably missed something but I cannot achieve this with comboeditor (it works fine with standard ListBox in my example). Even with commented Refresh. More, after some investigation I found that PagedCollectionView.SortDescriptionChanged called every time user open comboeditor. Could you look in my example one more time, Stephen.
Thanks
Andrey.
May be Stephen is not with Infragistics anymore. Hope other developer have a solution for us.