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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set selected items from list or object from ViewModel

Thread ID:





121166 Nov 16,2015 02:24 PM UTC Nov 19,2015 09:46 AM UTC WPF 3
Tags: ComboBoxAdv
Peter Viau
Asked On November 16, 2015 02:24 PM UTC

I'm looking at the sample application in"Syncfusion\EssentialStudio\\WPF\Tools.WPF\Samples\ComboBox\ComboBox\CS".

How do I set the selected items in ViewModel  to UK an CA on startup for example?

I will be loading the selected items from a database in the future so I need to understand how to load and save selected items.

Sugapriya Mariappan [Syncfusion]
Replied On November 17, 2015 11:37 AM UTC

Hi Peter,

Thank you for contacting Syncfusion Support

“Query #1: How do I set the selected items in ViewModel to UK and CA on startup for example?”

We have prepared a sample which tries to meet your requirement .In this sample, we have bound the first two items from the ObservableCollection to the SelectedItems collections property.

Please download the sample from the below link
Sample link:ComboBoxadvSample

“Query #2: how to load and save selected items.

We have bound the Checked ListBox SelectedItems to the ComboBoxAdv’s SelectedItems collection property in the button click event via command binding to achieve your requirement.

Please find the sample attached in the following link.
Sample: ComboboxAdvSaveSample


Peter Viau
Replied On November 18, 2015 02:45 PM UTC

Thank you for your quick reply!
I was able to combine both your samples to get what I needed except for one little enhancement I'd like to have.

Is it possible to add a checkbox called "All Users" that acts like  a toggle so that if "All Users" is checked all  the others get checked, and if "All Users" is unchecked then all get unchecked?
I think it would also get unchecked if the user selects another entry while it is checked.

Sugapriya Mariappan [Syncfusion]
Replied On November 19, 2015 09:46 AM UTC

Hi Peter,

We would like to inform you that we don’t have this support “Select and unselect all the items in ComboBoxAdv” currently and so have logged feature report regarding this. A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates


Please let us know if you have any questions.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon